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

Commit

Permalink
fix(prover): fix L1 height used in onBlockProven handler
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Oct 6, 2023
1 parent 854e38e commit 731725b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion prover/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,11 @@ func (p *Prover) onBlockProven(ctx context.Context, event *bindings.TaikoL1Clien
} else {
// generate oracle proof if oracle prover, proof is invalid
if p.cfg.OracleProver {
return p.requestProofForBlockId(event.BlockId, new(big.Int).SetUint64(event.Raw.BlockNumber))
L1Height, err := p.rpc.TaikoL2.LatestSyncedL1Height(&bind.CallOpts{Context: ctx, BlockNumber: event.BlockId})
if err != nil {
return err
}
return p.requestProofForBlockId(event.BlockId, new(big.Int).SetUint64(L1Height))
}
}

Expand Down

0 comments on commit 731725b

Please sign in to comment.