From 283d8ae2f7394a30aee0dc1812b4eed2e4c3ed83 Mon Sep 17 00:00:00 2001 From: welkin22 Date: Wed, 6 Nov 2024 15:54:38 +0800 Subject: [PATCH 1/2] fix unit test --- core/pevm_processor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pevm_processor.go b/core/pevm_processor.go index 83c5ef65c..990af4e0e 100644 --- a/core/pevm_processor.go +++ b/core/pevm_processor.go @@ -173,7 +173,6 @@ func (p *PEVMProcessor) confirmTxResult(statedb *state.StateDB, gp *GasPool, res log.Error("merge slotDB failed", "err", err) return err } - result.slotDB.Finalise(isByzantium || isEIP158) delayGasFee := result.result.delayFees // add delayed gas fee @@ -188,6 +187,7 @@ func (p *PEVMProcessor) confirmTxResult(statedb *state.StateDB, gp *GasPool, res statedb.AddBalance(params.OptimismL1FeeRecipient, delayGasFee.L1Fee) } } + result.slotDB.Finalise(isByzantium || isEIP158) // Do IntermediateRoot after mergeSlotDB. if !isByzantium { From a4868a17bd6e26e91520255c7383ac11701e4ea6 Mon Sep 17 00:00:00 2001 From: welkin22 Date: Wed, 6 Nov 2024 16:01:35 +0800 Subject: [PATCH 2/2] use patch to fix ut instead of changing code --- .github/workflows/unit-test.yaml | 1 + tests/fix_unit_test.patch | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/fix_unit_test.patch diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index feffce65e..cc1106b4e 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -19,4 +19,5 @@ jobs: go-version-file: go.mod - run: | git apply tests/0001-diff-go-ethereum.patch + git apply tests/fix_unit_test.patch make test diff --git a/tests/fix_unit_test.patch b/tests/fix_unit_test.patch new file mode 100644 index 000000000..7567c4ba4 --- /dev/null +++ b/tests/fix_unit_test.patch @@ -0,0 +1,19 @@ +Subject: [PATCH] fix unit test +--- +Index: core/txpool/legacypool/legacypool.go +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go +--- a/core/txpool/legacypool/legacypool.go (revision 1233f69823ec26df160575add475f1e949cde211) ++++ b/core/txpool/legacypool/legacypool.go (date 1730875125704) +@@ -391,7 +391,7 @@ + } + + func (pool *LegacyPool) loopOfSync() { +- ticker := time.NewTicker(200 * time.Second) ++ ticker := time.NewTicker(200 * time.Millisecond) + for { + select { + case <-pool.reorgShutdownCh: