Commit 77ce12b6 authored by Joshua Gutow's avatar Joshua Gutow

txmgr: Set ReceiptQueryInterval for op-e2e

parent 2ebe9f40
...@@ -581,6 +581,7 @@ func (cfg SystemConfig) Start(_opts ...SystemConfigOption) (*System, error) { ...@@ -581,6 +581,7 @@ func (cfg SystemConfig) Start(_opts ...SystemConfigOption) (*System, error) {
NumConfirmations: 1, NumConfirmations: 1,
SafeAbortNonceTooLowCount: 3, SafeAbortNonceTooLowCount: 3,
ResubmissionTimeout: 3 * time.Second, ResubmissionTimeout: 3 * time.Second,
ReceiptQueryInterval: 50 * time.Millisecond,
}, },
AllowNonFinalized: cfg.NonFinalizedProposals, AllowNonFinalized: cfg.NonFinalizedProposals,
LogConfig: oplog.CLIConfig{ LogConfig: oplog.CLIConfig{
...@@ -614,6 +615,7 @@ func (cfg SystemConfig) Start(_opts ...SystemConfigOption) (*System, error) { ...@@ -614,6 +615,7 @@ func (cfg SystemConfig) Start(_opts ...SystemConfigOption) (*System, error) {
NumConfirmations: 1, NumConfirmations: 1,
SafeAbortNonceTooLowCount: 3, SafeAbortNonceTooLowCount: 3,
ResubmissionTimeout: 3 * time.Second, ResubmissionTimeout: 3 * time.Second,
ReceiptQueryInterval: 50 * time.Millisecond,
}, },
LogConfig: oplog.CLIConfig{ LogConfig: oplog.CLIConfig{
Level: "info", Level: "info",
......
...@@ -94,6 +94,7 @@ type CLIConfig struct { ...@@ -94,6 +94,7 @@ type CLIConfig struct {
NumConfirmations uint64 NumConfirmations uint64
SafeAbortNonceTooLowCount uint64 SafeAbortNonceTooLowCount uint64
ResubmissionTimeout time.Duration ResubmissionTimeout time.Duration
ReceiptQueryInterval time.Duration
} }
func (m CLIConfig) Check() error { func (m CLIConfig) Check() error {
...@@ -156,12 +157,17 @@ func NewConfig(cfg CLIConfig, l log.Logger) (Config, error) { ...@@ -156,12 +157,17 @@ func NewConfig(cfg CLIConfig, l log.Logger) (Config, error) {
return Config{}, err return Config{}, err
} }
receiptQueryInterval := 30 * time.Second
if cfg.ReceiptQueryInterval != 0 {
receiptQueryInterval = cfg.ReceiptQueryInterval
}
return Config{ return Config{
Backend: l1, Backend: l1,
ResubmissionTimeout: cfg.ResubmissionTimeout, ResubmissionTimeout: cfg.ResubmissionTimeout,
ChainID: chainID, ChainID: chainID,
NetworkTimeout: networkTimeout, NetworkTimeout: networkTimeout,
ReceiptQueryInterval: 30 * time.Second, ReceiptQueryInterval: receiptQueryInterval,
NumConfirmations: cfg.NumConfirmations, NumConfirmations: cfg.NumConfirmations,
SafeAbortNonceTooLowCount: cfg.SafeAbortNonceTooLowCount, SafeAbortNonceTooLowCount: cfg.SafeAbortNonceTooLowCount,
Signer: signerFactory(chainID), Signer: signerFactory(chainID),
......
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