Skip to content

Commit

Permalink
Merge pull request #2225 from OffchainLabs/fix-noop-storage-check
Browse files Browse the repository at this point in the history
Fix data poster noop storage check in batch poster
  • Loading branch information
joshuacolvin0 authored Apr 9, 2024
2 parents 4ac357c + 3abce87 commit b178149
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arbnode/batch_poster.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ func (b *BatchPoster) checkReverts(ctx context.Context, to int64) (bool, error)
return false, fmt.Errorf("getting a receipt for transaction: %v, %w", tx.Hash, err)
}
if r.Status == types.ReceiptStatusFailed {
shouldHalt := !b.config().DataPoster.UseNoOpStorage
shouldHalt := !b.dataPoster.UsingNoOpStorage()
logLevel := log.Warn
if shouldHalt {
logLevel = log.Error
Expand Down
4 changes: 4 additions & 0 deletions arbnode/dataposter/data_poster.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ func (p *DataPoster) MaxMempoolTransactions() uint64 {
return arbmath.MinInt(config.MaxMempoolTransactions, config.MaxMempoolWeight)
}

func (p *DataPoster) UsingNoOpStorage() bool {
return p.usingNoOpStorage
}

var ErrExceedsMaxMempoolSize = errors.New("posting this transaction will exceed max mempool size")

// Does basic check whether posting transaction with specified nonce would
Expand Down

0 comments on commit b178149

Please sign in to comment.