Skip to content

Commit

Permalink
Merge pull request bnb-chain#217 from welkin22/feature/TxDAG-PEVM-fixut
Browse files Browse the repository at this point in the history
pevm: try to fix UT
  • Loading branch information
welkin22 authored Nov 7, 2024
2 parents 65bef51 + a4868a1 commit e23be46
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion core/pevm_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
19 changes: 19 additions & 0 deletions tests/fix_unit_test.patch
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit e23be46

Please sign in to comment.