Skip to content

Commit

Permalink
Fix possible panic.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frozen authored and ONECasey committed Mar 27, 2023
1 parent 8c2ff80 commit 1a70d5e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions core/blockchain_stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,6 @@ func (a Stub) Config() *params.ChainConfig {
return nil
}

func (a Stub) Engine() engine.Engine {
return nil
}

func (a Stub) SubscribeRemovedLogsEvent(ch chan<- RemovedLogsEvent) event.Subscription {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion core/epochchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (bc *EpochChain) InsertChain(blocks types.Blocks, _ bool) (int, error) {
}

// Signature validation.
err = bc.Engine().VerifyHeaderSignature(bc, block.Header(), sig, bitmap)
err = chain.Engine().VerifyHeaderSignature(bc, block.Header(), sig, bitmap)
if err != nil {
return i, errors.Wrap(err, "failed signature validation")
}
Expand Down

0 comments on commit 1a70d5e

Please sign in to comment.