Commit cd15c40a authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

teleportr: Limit to 10 confirmed deposits (#2637)

parent dfab86ff
---
'@eth-optimism/teleportr': patch
---
Only do 5 disbursements at a time
......@@ -4,7 +4,6 @@ import (
"context"
"crypto/ecdsa"
"errors"
"math"
"math/big"
"strings"
"time"
......@@ -34,6 +33,8 @@ var DisbursementFailedTopic = common.HexToHash(
"0x9b478c095979d3d3a7d602ffd9ee1f0843204d853558ae0882c8fcc0a5bc78cf",
)
const MaxDisbursements = 5
type Config struct {
Name string
L1Client *ethclient.Client
......@@ -194,7 +195,7 @@ func (d *Driver) GetBatchBlockRange(
// After successfully ingesting deposits, check to see if there are any
// now-confirmed deposits that we can attempt to disburse.
confirmedDeposits, err := d.loadConfirmedDepositsInRange(
blockNumber, startID64, math.MaxUint64,
blockNumber, startID64, startID64+MaxDisbursements,
)
if err != nil {
return nil, nil, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment