Skip to content

Commit

Permalink
Fix poseidon exceed
Browse files Browse the repository at this point in the history
  • Loading branch information
ignasirv committed Feb 1, 2024
1 parent 53ca9b0 commit defb8ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ module.exports = class Processor {

this.vm = vm;
this.oldVm = cloneDeep(vm);
this.oldVm.stateManager = vm.stateManager.copy();
this.evmSteps = [];
this.updatedAccounts = {};
this.isLegacyTx = false;
Expand Down Expand Up @@ -683,7 +684,7 @@ module.exports = class Processor {
if (this.smt.maxLevel > maxLevelPerTx) {
console.log('WARNING: smt levels increased more than expected, re running batch with new smt levels');
this._rollbackBatch();
i = 0;
i = -1;
}
}
await this.consolidateBlock();
Expand Down Expand Up @@ -934,6 +935,7 @@ module.exports = class Processor {
_rollbackBatch() {
this.currentStateRoot = this.oldStateRoot;
this.vm = cloneDeep(this.oldVm);
this.vm.stateManager = this.oldVm.stateManager.copy();
this.updatedAccounts = {};
}

Expand Down

0 comments on commit defb8ec

Please sign in to comment.