From a8aca8899fea5ac7c40fcc023dfe47f48ba33080 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Wed, 5 Jul 2023 17:34:01 +0530 Subject: [PATCH] fix : testCommitInterruptExperimentBor --- consensus/bor/bor.go | 2 +- miner/worker_test.go | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/consensus/bor/bor.go b/consensus/bor/bor.go index 93b3a0b093..88aeda4c94 100644 --- a/consensus/bor/bor.go +++ b/consensus/bor/bor.go @@ -907,7 +907,7 @@ func (c *Bor) FinalizeAndAssemble(ctx context.Context, chain consensus.ChainHead header.UncleHash = types.CalcUncleHash(nil) // Assemble block - block := types.NewBlock(header, txs, nil, receipts, new(trie.Trie)) + block := types.NewBlock(header, txs, nil, receipts, trie.NewStackTrie(nil)) // set state sync bc := chain.(core.BorStateSyncer) diff --git a/miner/worker_test.go b/miner/worker_test.go index 240eca136a..2c2b463d06 100644 --- a/miner/worker_test.go +++ b/miner/worker_test.go @@ -735,9 +735,7 @@ func testCommitInterruptExperimentBorContract(t *testing.T, delay uint, txCount txs = append(txs, tx) } - if err := b.TxPool().AddRemotes(txs); err != nil { - t.Fatal(err) - } + b.TxPool().AddRemotes(txs) // Start mining! w.start() @@ -783,9 +781,7 @@ func testCommitInterruptExperimentBor(t *testing.T, delay uint, txCount int, opc txs = append(txs, tx) } - if err := b.TxPool().AddRemotes(txs); err != nil { - t.Fatal(err) - } + b.TxPool().AddRemotes(txs) // Start mining! w.start()