aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-cov/src
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-06-15 07:53:29 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-06-15 07:53:29 +0800
commitd118533d876fdf290af5e0e5a08dd84ff001eee4 (patch)
tree9d7b9826484246cc876a8f9997af8b91e3a2b3c8 /packages/sol-cov/src
parentef61c3543fba2030515002ec418afc388e0e1033 (diff)
downloaddexon-sol-tools-d118533d876fdf290af5e0e5a08dd84ff001eee4.tar
dexon-sol-tools-d118533d876fdf290af5e0e5a08dd84ff001eee4.tar.gz
dexon-sol-tools-d118533d876fdf290af5e0e5a08dd84ff001eee4.tar.bz2
dexon-sol-tools-d118533d876fdf290af5e0e5a08dd84ff001eee4.tar.lz
dexon-sol-tools-d118533d876fdf290af5e0e5a08dd84ff001eee4.tar.xz
dexon-sol-tools-d118533d876fdf290af5e0e5a08dd84ff001eee4.tar.zst
dexon-sol-tools-d118533d876fdf290af5e0e5a08dd84ff001eee4.zip
Remove redundant check in trace.ts and revert_trace.ts
Diffstat (limited to 'packages/sol-cov/src')
-rw-r--r--packages/sol-cov/src/revert_trace.ts3
-rw-r--r--packages/sol-cov/src/trace.ts4
2 files changed, 1 insertions, 6 deletions
diff --git a/packages/sol-cov/src/revert_trace.ts b/packages/sol-cov/src/revert_trace.ts
index 1d52b969e..a78d1afa8 100644
--- a/packages/sol-cov/src/revert_trace.ts
+++ b/packages/sol-cov/src/revert_trace.ts
@@ -30,9 +30,6 @@ export function getRevertTrace(structLogs: StructLog[], startAddress: string): E
structLog.stack[structLog.stack.length - jumpAddressOffset - 1],
);
- if (structLog === _.last(normalizedStructLogs)) {
- throw new Error('Malformed trace. CALL-like opcode can not be the last one');
- }
// Sometimes calls don't change the execution context (current address). When we do a transfer to an
// externally owned account - it does the call and immediately returns because there is no fallback
// function. We manually check if the call depth had changed to handle that case.
diff --git a/packages/sol-cov/src/trace.ts b/packages/sol-cov/src/trace.ts
index fad2e5e08..635019fc0 100644
--- a/packages/sol-cov/src/trace.ts
+++ b/packages/sol-cov/src/trace.ts
@@ -33,9 +33,7 @@ export function getTracesByContractAddress(structLogs: StructLog[], startAddress
const newAddress = utils.getAddressFromStackEntry(
structLog.stack[structLog.stack.length - jumpAddressOffset - 1],
);
- if (structLog === _.last(normalizedStructLogs)) {
- throw new Error('Malformed trace. CALL-like opcode can not be the last one');
- }
+
// Sometimes calls don't change the execution context (current address). When we do a transfer to an
// externally owned account - it does the call and immediately returns because there is no fallback
// function. We manually check if the call depth had changed to handle that case.