From 0fe45c278b8e79fba7d187d221f62657ab5f24f2 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Wed, 31 Aug 2022 16:40:21 +0800 Subject: [PATCH] eth, miner: minor fixes --- eth/catalyst/api.go | 3 +-- eth/catalyst/api_test.go | 2 -- miner/worker_test.go | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go index 92a154a4f668..754d8b214ca7 100644 --- a/eth/catalyst/api.go +++ b/eth/catalyst/api.go @@ -287,8 +287,7 @@ func (api *ConsensusAPI) ForkchoiceUpdatedV1(update beacon.ForkchoiceStateV1, pa return valid(nil), beacon.InvalidPayloadAttributes.With(err) } // Send a request to generate a full block in the background. - // The result can be obtained via the returned channel. The - // timeout for building block is set to prevent some huge blocks. + // The result can be obtained via the returned channel. resCh, err := api.eth.Miner().GetSealingBlockAsync(update.HeadBlockHash, payloadAttributes.Timestamp, payloadAttributes.SuggestedFeeRecipient, payloadAttributes.Random, false) if err != nil { log.Error("Failed to create async sealing payload", "err", err) diff --git a/eth/catalyst/api_test.go b/eth/catalyst/api_test.go index 023e92ddef22..66da0bc18c3c 100644 --- a/eth/catalyst/api_test.go +++ b/eth/catalyst/api_test.go @@ -809,10 +809,8 @@ func TestInvalidBloom(t *testing.T) { func TestNewPayloadOnInvalidTerminalBlock(t *testing.T) { genesis, preMergeBlocks := generatePreMergeChain(100) - //fmt.Println(genesis.Config.TerminalTotalDifficulty) genesis.Config.TerminalTotalDifficulty = preMergeBlocks[0].Difficulty() //.Sub(genesis.Config.TerminalTotalDifficulty, preMergeBlocks[len(preMergeBlocks)-1].Difficulty()) - //fmt.Println(genesis.Config.TerminalTotalDifficulty) n, ethservice := startEthService(t, genesis, preMergeBlocks) defer n.Close() diff --git a/miner/worker_test.go b/miner/worker_test.go index b903e8db2102..0cba7ff9955f 100644 --- a/miner/worker_test.go +++ b/miner/worker_test.go @@ -633,7 +633,7 @@ func testGetSealingWork(t *testing.T, chainConfig *params.ChainConfig, engine co // This API should work even when the automatic sealing is not enabled for _, c := range cases { - resChan, errChan, _ := w.getSealingBlock(c.parent, timestamp, c.coinbase, c.random, false, 0) + resChan, errChan, _ := w.getSealingBlock(c.parent, timestamp, c.coinbase, c.random, false) block := <-resChan err := <-errChan if c.expectErr { @@ -651,7 +651,7 @@ func testGetSealingWork(t *testing.T, chainConfig *params.ChainConfig, engine co // This API should work even when the automatic sealing is enabled w.start() for _, c := range cases { - resChan, errChan, _ := w.getSealingBlock(c.parent, timestamp, c.coinbase, c.random, false, 0) + resChan, errChan, _ := w.getSealingBlock(c.parent, timestamp, c.coinbase, c.random, false) block := <-resChan err := <-errChan if c.expectErr {