Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make txArriveTimeout Configurable w/ CLI Flag #734

Merged
merged 14 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ var (
// fetcher flag to set arrival timeout
TxArrivalWaitFlag = cli.IntFlag{
Name: "txarrivalwait",
Usage: "Maximum number of milliseconds to wait for a transaction before requesting it (defaults to 100ms)",
Usage: "Maximum number of milliseconds to wait for a transaction before requesting it (defaults to 500ms)",
thogard785 marked this conversation as resolved.
Show resolved Hide resolved
Value: node.DefaultConfig.P2P.TxArrivalWait,
}

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ The ```bor server``` command runs the Bor client.

- ```v5disc```: Enables the experimental RLPx V5 (Topic Discovery) mechanism (default: false)

- ```txarrivalwait```: Maximum number of milliseconds to wait before requesting an announced transaction (default: 100)
- ```txarrivalwait```: Maximum number of milliseconds to wait before requesting an announced transaction (default: 500)
thogard785 marked this conversation as resolved.
Show resolved Hide resolved

### Sealer Options

Expand Down
2 changes: 1 addition & 1 deletion eth/fetcher/tx_fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var (
}
// testTxsHashes is the hashes of the test transactions above
testTxsHashes = []common.Hash{testTxs[0].Hash(), testTxs[1].Hash(), testTxs[2].Hash(), testTxs[3].Hash()}
testTxArrivalWait = 100 * time.Millisecond
testTxArrivalWait = 500 * time.Millisecond
)

type doTxNotify struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ func DefaultConfig() *Config {
Port: 30303,
NoDiscover: false,
NAT: "any",
TxArrivalWait: 100,
TxArrivalWait: 500,
Discovery: &P2PDiscovery{
V5Enabled: false,
Bootnodes: []string{},
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/server/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ func (c *Command) Flags() *flagset.Flagset {
})
f.Uint64Flag(&flagset.Uint64Flag{
Name: "txarrivalwait",
Usage: "Maximum number of milliseconds to wait for a transaction before requesting it (defaults to 100ms)",
Usage: "Maximum number of milliseconds to wait for a transaction before requesting it (defaults to 500ms)",
Value: &c.cliConfig.P2P.TxArrivalWait,
Default: c.cliConfig.P2P.TxArrivalWait,
Group: "P2P",
Expand Down
2 changes: 1 addition & 1 deletion node/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var DefaultConfig = Config{
ListenAddr: ":30303",
MaxPeers: 50,
NAT: nat.Any(),
TxArrivalWait: 100,
TxArrivalWait: 500,
},
}

Expand Down