Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pevm: try to fix UT #217

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Loading