From 8f69e399fae8916dd0db397b31464ece55a2e63c Mon Sep 17 00:00:00 2001 From: David Murdoch <187813+davidmurdoch@users.noreply.github.com> Date: Fri, 6 Aug 2021 17:24:37 -0400 Subject: [PATCH] fix(forking): ignore txs that fail when running the block in traceTransaction (#929) --- .../ethereum/src/helpers/run-transactions.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/chains/ethereum/ethereum/src/helpers/run-transactions.ts b/src/chains/ethereum/ethereum/src/helpers/run-transactions.ts index 16250d9b2e..a9d8864c1c 100644 --- a/src/chains/ethereum/ethereum/src/helpers/run-transactions.ts +++ b/src/chains/ethereum/ethereum/src/helpers/run-transactions.ts @@ -17,9 +17,13 @@ export async function runTransactions( block: RuntimeBlock ) { for (let i = 0, l = transactions.length; i < l; i++) { - await vm.runTx({ - tx: transactions[i] as any, - block: block as any - }); + await vm + .runTx({ + tx: transactions[i] as any, + block: block as any + }) + // we ignore transactions that error because we just want to _run_ these, + // transactions just to update the blockchain's state + .catch(() => {}); } }