Skip to content

Commit

Permalink
Merge pull request #80 from BoostryJP/tuning-payload-timeout
Browse files Browse the repository at this point in the history
Tuning payload timeout
  • Loading branch information
YoshihitoAso committed Mar 22, 2024
2 parents 5261aec + 8ad8381 commit 0ff9509
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(800000000), 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 = 800000000
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(800 * 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: 800 * 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 0ff9509

Please sign in to comment.