Fix a bug when a custom Geth tracer didn't return stack entries for DELEGATECALL

This commit is contained in:
Leonid Logvinov
2019-01-17 14:27:39 +01:00
parent cdac2d210e
commit 83f77a2d56
2 changed files with 10 additions and 1 deletions

View File

@@ -1,4 +1,13 @@
[
{
"version": "4.0.1",
"changes": [
{
"note": "Fix a bug when a custom Geth tracer didn't return stack entries for `DELEGATECALL`",
"pr": "TODO"
}
]
},
{
"version": "4.0.0",
"changes": [

View File

@@ -31,7 +31,7 @@ export abstract class TraceInfoSubprovider extends TraceCollectionSubprovider {
const depth = 0 | log.getDepth();
const gasCost = 0 | log.getCost();
const gas = 0 | log.getGas();
const isCall = opn == 0xf1 || opn == 0xf2 || opn == 0xf4 || opn == 0xf5;
const isCall = opn == 0xf1 || opn == 0xf2 || opn == 0xf4 || opn == 0xf5 || opn == 0xfa;
const stack = isCall ? ['0x'+log.stack.peek(1).toString(16), null] : null;
this.data.push({ pc, gasCost, depth, op, stack, gas });
},