Skip to content

Commit

Permalink
functionDepth = 1 for base level EOF
Browse files Browse the repository at this point in the history
Signed-off-by: Danno Ferrin <[email protected]>
  • Loading branch information
shemnon committed Dec 15, 2024
1 parent f184853 commit 338e491
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public void tracePreExecution(final MessageFrame messageFrame) {
memory = null;
}
depth = messageFrame.getMessageStackSize();
functionDepth = messageFrame.returnStackSize() + 1;
functionDepth = messageFrame.getCode().getEofVersion() > 0 ? messageFrame.returnStackSize() + 1 : 0;

StringBuilder sb = new StringBuilder();
if (showStorage) {
Expand Down Expand Up @@ -262,7 +262,7 @@ public void tracePostExecution(
sb.append("\"returnData\":\"").append(returnData.toHexString()).append("\",");
}
sb.append("\"depth\":").append(depth).append(",");
if (functionDepth > 1) {
if (functionDepth > 0) {
sb.append("\"functionDepth\":").append(functionDepth).append(",");
}
sb.append("\"refund\":").append(messageFrame.getGasRefund()).append(",");
Expand Down

0 comments on commit 338e491

Please sign in to comment.