mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 13:28:01 -05:00
Simplify BeaconBlockIsNil() (#11373)
* Simplify `BeaconBlockIsNil()` * remove unused code Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
This commit is contained in:
@@ -24,8 +24,6 @@ var (
|
||||
ErrNilObject = errors.New("received nil object")
|
||||
// ErrNilSignedBeaconBlock is returned when a nil signed beacon block is received.
|
||||
ErrNilSignedBeaconBlock = errors.New("signed beacon block can't be nil")
|
||||
errNilBeaconBlock = errors.New("beacon block can't be nil")
|
||||
errNilBeaconBlockBody = errors.New("beacon block body can't be nil")
|
||||
)
|
||||
|
||||
// NewSignedBeaconBlock creates a signed beacon block from a protobuf signed beacon block.
|
||||
|
||||
@@ -17,12 +17,6 @@ func BeaconBlockIsNil(b interfaces.SignedBeaconBlock) error {
|
||||
if b == nil || b.IsNil() {
|
||||
return ErrNilSignedBeaconBlock
|
||||
}
|
||||
if b.Block().IsNil() {
|
||||
return errNilBeaconBlock
|
||||
}
|
||||
if b.Block().Body().IsNil() {
|
||||
return errNilBeaconBlockBody
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user