Skip to content

Commit

Permalink
fix: init properly
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Letang <[email protected]>
  • Loading branch information
jeremyletang committed Mar 4, 2024
1 parent 0568fc6 commit 2003356
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/datasource/external/ethverifier/l2_verifier_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,13 @@ func (s *L2Verifiers) restoreState(ctx context.Context, l2EthOracles *snapshotpb
// this is the block of the upgrade
// we only initialize this the patchBlock and lastBlock
if v.Misc == nil {
// no patchBlock, set it to the last Block
verifier.restorePatchBlock(ctx, &types.EthBlock{
Height: v.LastBlock.BlockHeight,
Time: v.LastBlock.BlockTime,
})
if lastBlock != nil {
// no patchBlock, set it to the last Block
verifier.restorePatchBlock(ctx, &types.EthBlock{
Height: lastBlock.Height,
Time: lastBlock.Time,
})
}
} else if v.Misc != nil {
// only run this if the misc exists, which might
// not be the case on a new upgrade after it's
Expand Down

0 comments on commit 2003356

Please sign in to comment.