babylonchain / babylon-finality-gadget

2 stars 2 forks source link

feat: query finality for a block range #54

Closed lesterli closed 2 months ago

lesterli commented 2 months ago

This PR adds the function QueryBlockRangeBabylonFinalized(queryBlocks []*L2Block) that returns uint64 representing the last finalized block in the block range.

This API will be used by the tryFinalize() in the OP finalizer. We found it doesn't call on each L2 block b/c onPendingSafeUpdate only triggered upon a new L1 block.