aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2019-01-17 21:36:12 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2019-01-17 21:36:23 +0800
commit4c5bde1b544f66d70957824658ad37230735d527 (patch)
treee900febfa84065bda1a1ac0d613f80d1d26a6a30
parent83f77a2d561780c97790fe44a3d34a3c7e847273 (diff)
downloaddexon-sol-tools-4c5bde1b544f66d70957824658ad37230735d527.tar
dexon-sol-tools-4c5bde1b544f66d70957824658ad37230735d527.tar.gz
dexon-sol-tools-4c5bde1b544f66d70957824658ad37230735d527.tar.bz2
dexon-sol-tools-4c5bde1b544f66d70957824658ad37230735d527.tar.lz
dexon-sol-tools-4c5bde1b544f66d70957824658ad37230735d527.tar.xz
dexon-sol-tools-4c5bde1b544f66d70957824658ad37230735d527.tar.zst
dexon-sol-tools-4c5bde1b544f66d70957824658ad37230735d527.zip
Fix a bug when TraceCollectionSubprovider was hanging on the fake Geth snapshot transaction
-rw-r--r--packages/sol-tracing-utils/CHANGELOG.json6
-rw-r--r--packages/sol-tracing-utils/src/trace_collection_subprovider.ts2
2 files changed, 6 insertions, 2 deletions
diff --git a/packages/sol-tracing-utils/CHANGELOG.json b/packages/sol-tracing-utils/CHANGELOG.json
index 9ee298e22..17f9466bb 100644
--- a/packages/sol-tracing-utils/CHANGELOG.json
+++ b/packages/sol-tracing-utils/CHANGELOG.json
@@ -3,7 +3,11 @@
"version": "4.0.1",
"changes": [
{
- "note": "Fix a bug when a custom Geth tracer didn't return stack entries for `DELEGATECALL`",
+ "note": "Fix a bug when a custom `Geth` tracer didn't return stack entries for `DELEGATECALL`",
+ "pr": "TODO"
+ },
+ {
+ "note": "Fix a bug when `TraceCollectionSubprovider` was hanging on the fake `Geth` snapshot transaction",
"pr": "TODO"
}
]
diff --git a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
index 323e1523c..d34707a13 100644
--- a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
+++ b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
@@ -144,7 +144,7 @@ export abstract class TraceCollectionSubprovider extends Subprovider {
txHash: string | undefined,
cb: Callback,
): Promise<void> {
- if (!txData.isFakeTransaction) {
+ if (!txData.isFakeTransaction && !(txData.from === txData.to)) {
// This transaction is a usual transaction. Not a call executed as one.
// And we don't want it to be executed within a snapshotting period
await this._lock.acquire();