From 8ad83814dad76a5444a1717f31b4681b01197a5e Mon Sep 17 00:00:00 2001 From: YoshihitoAso Date: Thu, 21 Mar 2024 10:29:34 +0900 Subject: [PATCH] tuning timeout tuning timeout tuning timeout tuning timeout --- cmd/geth/config_test.go | 4 ++-- miner/config_test.go | 2 +- miner/miner.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/geth/config_test.go b/cmd/geth/config_test.go index 10e965f28..ccbf264b2 100644 --- a/cmd/geth/config_test.go +++ b/cmd/geth/config_test.go @@ -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] @@ -488,7 +488,7 @@ GasCeil = 800000000 GasPrice = 0 Recommit = 3000000000 Noverify = false -NewPayloadTimeout = 600000000 +NewPayloadTimeout = 200000000 AllowedFutureBlockTime = 0 [Eth.GPO] diff --git a/miner/config_test.go b/miner/config_test.go index be3463647..9cfd5fb7b 100644 --- a/miner/config_test.go +++ b/miner/config_test.go @@ -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") diff --git a/miner/miner.go b/miner/miner.go index e4e323338..46a60d51b 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -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.