Skip to content

Commit

Permalink
switch to longer resub time
Browse files Browse the repository at this point in the history
  • Loading branch information
lalexgap committed Oct 6, 2022
1 parent b70ab36 commit b196845
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/engine/chainservice/eth_chainservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ type EthChainService struct {

// RESUB_INTERVAL is how often we resubscribe to log events.
// We do this to avoid https://github.com/ethereum/go-ethereum/issues/23845
const RESUB_INTERVAL = 60 * time.Second
// We use 4:30 as the default filter timeout is 5 minutes.
// See https://github.com/ethereum/go-ethereum/blob/e14164d516600e9ac66f9060892e078f5c076229/eth/filters/filter_system.go#L43
const RESUB_INTERVAL = 4*time.Minute + 30*time.Second

// NewEthChainService constructs a chain service that submits transactions to a NitroAdjudicator
// and listens to events from an eventSource
Expand Down Expand Up @@ -114,7 +116,6 @@ func (ecs *EthChainService) SendTransaction(tx protocols.ChainTransaction) error
return fmt.Errorf("unexpected transaction type %T", tx)
}
}

func (ecs *EthChainService) subcribeToEvents() error {

go ecs.listenForLogEvents()
Expand Down

0 comments on commit b196845

Please sign in to comment.