Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip wait L1 block confirmations after restart #3662

Merged
merged 2 commits into from
May 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sequencesender/sequencesender.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ func (s *SequenceSender) tryToSendSequence(ctx context.Context) {
// process monitored sequences before starting a next cycle
s.ethTxManager.ProcessPendingMonitoredTxs(ctx, ethTxManagerOwner, func(result ethtxmanager.MonitoredTxResult, dbTx pgx.Tx) {
if result.Status == ethtxmanager.MonitoredTxStatusConfirmed {
if s.lastSequenceEndBatch == 0 {
// It's the first time we call that function after the restart of the sequence-sender and we are having the confirmation of a pending L1 tx sent
// before the sequence-sender was restarted. At this point we don't know which batch was the last sequenced, therefore we cannot wait for
// the L1 block confirmations and compare the last sequenced batch in the SC with the last sequenced from sequence-sender. We continue
return
}

if len(result.Txs) > 0 {
var txL1BlockNumber uint64
var txHash common.Hash
Expand Down
Loading