Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .changeset/moody-drinks-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/teleportr': patch
---

Only do 5 disbursements at a time
5 changes: 3 additions & 2 deletions teleportr/drivers/disburser/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"crypto/ecdsa"
"errors"
"math"
"math/big"
"strings"
"time"
Expand Down Expand Up @@ -34,6 +33,8 @@ var DisbursementFailedTopic = common.HexToHash(
"0x9b478c095979d3d3a7d602ffd9ee1f0843204d853558ae0882c8fcc0a5bc78cf",
)

const MaxDisbursements = 5

type Config struct {
Name string
L1Client *ethclient.Client
Expand Down Expand Up @@ -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
Expand Down