Skip to content

Commit

Permalink
chore(blockchain): Remove redundant checks
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear committed Mar 14, 2024
1 parent 9fa1cd5 commit 0515483
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions beacon/blockchain/receive_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ func (s *Service) validateStateTransition(
ctx context.Context, blk beacontypes.ReadOnlyBeaconBlock,
proposerPubKey [bls12381.PubKeyLength]byte,
) error {
if blk.IsNil() {
return beacontypes.ErrNilBlk
}

// Ensure Body is non nil.
body := blk.GetBody()
if body.IsNil() {
Expand Down Expand Up @@ -198,10 +194,6 @@ func (s *Service) validateExecutionOnBlock(
ctx context.Context,
blk beacontypes.ReadOnlyBeaconBlock,
) (bool, error) {
if blk.IsNil() {
return false, beacontypes.ErrNilBlk
}

body := blk.GetBody()
payload := body.GetExecutionPayload()
if payload.IsNil() {
Expand Down

0 comments on commit 0515483

Please sign in to comment.