From 11f8ca3f283a369fa1f825f0f75a927a31dc72d6 Mon Sep 17 00:00:00 2001 From: Liam Lai Date: Fri, 15 Mar 2024 18:52:06 +1100 Subject: [PATCH 1/2] after we use time.Ticker it didn't allow to have 0 time duration --- eth/bloombits.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eth/bloombits.go b/eth/bloombits.go index 69e2528a54c9..05fd203ba457 100644 --- a/eth/bloombits.go +++ b/eth/bloombits.go @@ -17,9 +17,10 @@ package eth import ( - "github.com/XinFinOrg/XDPoSChain/core/rawdb" "time" + "github.com/XinFinOrg/XDPoSChain/core/rawdb" + "github.com/XinFinOrg/XDPoSChain/common" "github.com/XinFinOrg/XDPoSChain/common/bitutil" "github.com/XinFinOrg/XDPoSChain/core" @@ -44,7 +45,7 @@ const ( // bloomRetrievalWait is the maximum time to wait for enough bloom bit requests // to accumulate request an entire batch (avoiding hysteresis). - bloomRetrievalWait = time.Duration(0) + bloomRetrievalWait = time.Microsecond * 100 ) // startBloomHandlers starts a batch of goroutines to accept bloom bit database From d558611a7ee047c4b9459e5fbcf3b9f4c060b1f1 Mon Sep 17 00:00:00 2001 From: Liam Lai Date: Fri, 15 Mar 2024 18:58:10 +1100 Subject: [PATCH 2/2] after we use time.Ticker it didn't allow to have 0 time duration --- eth/bloombits.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eth/bloombits.go b/eth/bloombits.go index 05fd203ba457..097b4fb94d5b 100644 --- a/eth/bloombits.go +++ b/eth/bloombits.go @@ -19,12 +19,11 @@ package eth import ( "time" - "github.com/XinFinOrg/XDPoSChain/core/rawdb" - "github.com/XinFinOrg/XDPoSChain/common" "github.com/XinFinOrg/XDPoSChain/common/bitutil" "github.com/XinFinOrg/XDPoSChain/core" "github.com/XinFinOrg/XDPoSChain/core/bloombits" + "github.com/XinFinOrg/XDPoSChain/core/rawdb" "github.com/XinFinOrg/XDPoSChain/core/types" "github.com/XinFinOrg/XDPoSChain/ethdb" "github.com/XinFinOrg/XDPoSChain/params"