Skip to content

Commit

Permalink
Skip HardFork validation in trace task (#46)
Browse files Browse the repository at this point in the history
Co-Authored-By: Kasumi <[email protected]>
  • Loading branch information
zemse and kasumi-1 committed May 19, 2023
1 parent 74e6cae commit cc01723
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/tasks/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,18 @@ async function traceTransctionWithProgress(node: HardhatNode, hash: string) {
// console.log(txHash.toString("hex"));

if (txHash.equals(hashBuffer)) {
await vm.runTx({ tx: txWithCommon, block });
await vm.runTx({
tx: txWithCommon,
block,
skipHardForkValidation: true,
});
return; // stop here and print last trace
}
await vm.runTx({ tx: txWithCommon, block });
await vm.runTx({
tx: txWithCommon,
block,
skipHardForkValidation: true,
});
currentProgress += Number(tx.gasLimit.toString());
if (Date.now() - progressPrinted > 1000) {
console.warn(
Expand Down

0 comments on commit cc01723

Please sign in to comment.