mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
clean up: godoc comments, redundant castings and more (#11428)
* clean up: Godoc comments, redundant castings and more * Fix assertion check * Update beacon-chain/forkchoice/doubly-linked-tree/forkchoice.go Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> * Update beacon-chain/forkchoice/protoarray/store.go Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
This commit is contained in:
@@ -275,7 +275,7 @@ func (p *PayloadStatus) MarshalJSON() ([]byte, error) {
|
||||
var latestHash *common.Hash
|
||||
if p.LatestValidHash != nil {
|
||||
hash := common.Hash(bytesutil.ToBytes32(p.LatestValidHash))
|
||||
latestHash = (*common.Hash)(&hash)
|
||||
latestHash = &hash
|
||||
}
|
||||
return json.Marshal(payloadStatusJSON{
|
||||
LatestValidHash: latestHash,
|
||||
@@ -324,7 +324,7 @@ func (t *TransitionConfiguration) MarshalJSON() ([]byte, error) {
|
||||
}
|
||||
return json.Marshal(transitionConfigurationJSON{
|
||||
TerminalTotalDifficulty: hexNum,
|
||||
TerminalBlockHash: common.Hash(*(*[32]byte)(t.TerminalBlockHash)),
|
||||
TerminalBlockHash: *(*[32]byte)(t.TerminalBlockHash),
|
||||
TerminalBlockNumber: hexutil.Uint64(num.Uint64()),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user