Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
feat: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Oct 19, 2023
1 parent 39e9089 commit 557112b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions prover/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,22 +414,22 @@ func (p *Prover) onBlockProposed(
return nil
}

currentL1OriginHeader, err := p.rpc.L1.HeaderByNumber(ctx, new(big.Int).SetUint64(event.Meta.L1Height))
lastL1OriginHeader, err := p.rpc.L1.HeaderByNumber(ctx, new(big.Int).SetUint64(event.Meta.L1Height))
if err != nil {
return fmt.Errorf("failed to get L1 header, height %d: %w", event.Meta.L1Height, err)
}

if currentL1OriginHeader.Hash() != event.Meta.L1Hash {
if lastL1OriginHeader.Hash() != event.Meta.L1Hash {
log.Warn(
"L1 block hash mismatch due to L1 reorg",
"height", event.Meta.L1Height,
"currentL1OriginHeader", currentL1OriginHeader.Hash(),
"lastL1OriginHeader", lastL1OriginHeader.Hash(),
"l1HashInEvent", event.Meta.L1Hash,
)

return fmt.Errorf(
"L1 block hash mismatch due to L1 reorg: %s != %s",
currentL1OriginHeader.Hash(),
lastL1OriginHeader.Hash(),
event.Meta.L1Hash,
)
}
Expand Down

0 comments on commit 557112b

Please sign in to comment.