Skip to content

Commit

Permalink
Add Current and Reference BlockNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth More authored and Siddharth More committed Apr 18, 2024
1 parent 6a50f91 commit 7c2f690
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions disperser/batcher/batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,15 @@ func (b *Batcher) HandleSingleBatch(ctx context.Context) error {
_ = b.handleFailure(ctx, batch.BlobMetadata, FailConfirmBatch)
return fmt.Errorf("HandleSingleBatch: error building confirmBatch transaction: %w", err)
}

// Get Current Block Number
currentBlockNumber, err := b.Transactor.GetCurrentBlockNumber(ctx)
if err != nil {
log.Warn("HandleSingleBatch: error getting current block number", "err", err)
}
log.Debug("HandleSingleBatch: Current block number", "blockNumber", currentBlockNumber)
log.Debug("HandleSingleBatch: Reference block number", "blockNumber", batch.BatchHeader.ReferenceBlockNumber)

err = b.TransactionManager.ProcessTransaction(ctx, NewTxnRequest(txn, "confirmBatch", big.NewInt(0), confirmationMetadata{
batchHeader: batch.BatchHeader,
blobs: batch.BlobMetadata,
Expand Down

0 comments on commit 7c2f690

Please sign in to comment.