Skip to content

Commit

Permalink
tuning timeout
Browse files Browse the repository at this point in the history
tuning timeout

tuning timeout

tuning timeout
  • Loading branch information
YoshihitoAso committed Mar 21, 2024
1 parent 56bf134 commit 8ad8381
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/geth/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func TestFlagsConfig(t *testing.T) {
assert.Equal(t, big.NewInt(1000000000), miner.GasPrice)
assert.Equal(t, time.Duration(3000000000), miner.Recommit)
assert.Equal(t, false, miner.Noverify)
assert.Equal(t, time.Duration(600000000), miner.NewPayloadTimeout)
assert.Equal(t, time.Duration(200000000), miner.NewPayloadTimeout)
assert.Equal(t, uint64(0), miner.AllowedFutureBlockTime)

// [Eth.GPO]
Expand Down Expand Up @@ -488,7 +488,7 @@ GasCeil = 800000000
GasPrice = 0
Recommit = 3000000000
Noverify = false
NewPayloadTimeout = 600000000
NewPayloadTimeout = 200000000
AllowedFutureBlockTime = 0
[Eth.GPO]
Expand Down
2 changes: 1 addition & 1 deletion miner/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestMinerDefautConfig(t *testing.T) {
"DefaultConfig.GasFloor": {DefaultConfig.GasFloor, 700000000},
"DefaultConfig.GasCeil": {DefaultConfig.GasCeil, 800000000},
"DefaultConfig.Recommit": {uint64(DefaultConfig.Recommit), uint64(3 * time.Second)},
"DefaultConfig.NewPayloadTimeout": {uint64(DefaultConfig.NewPayloadTimeout), uint64(600 * time.Millisecond)},
"DefaultConfig.NewPayloadTimeout": {uint64(DefaultConfig.NewPayloadTimeout), uint64(200 * time.Millisecond)},
}
for k, v := range testData {
assert.Equal(t, v.expected, v.actual, k+" value mismatch")
Expand Down
2 changes: 1 addition & 1 deletion miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var DefaultConfig = Config{
GasCeil: params.GenesisGasLimit,
GasPrice: big.NewInt(params.GWei),
Recommit: 3 * time.Second,
NewPayloadTimeout: 600 * time.Millisecond, // for ibet
NewPayloadTimeout: 200 * time.Millisecond, // for ibet
}

// Miner creates blocks and searches for proof-of-work values.
Expand Down

0 comments on commit 8ad8381

Please sign in to comment.