Skip to content

Commit

Permalink
rusk: add move_to_commit
Browse files Browse the repository at this point in the history
Resolves #2277
  • Loading branch information
herr-seppia committed Sep 5, 2024
1 parent d55e923 commit e5692b5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rusk/src/lib/node/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ impl VMExecution for Rusk {
Ok((txs, verification_output))
}

fn move_to_commit(&self, commit: [u8; 32]) -> anyhow::Result<()> {
self.session(0, Some(commit))
.map_err(|e| anyhow::anyhow!("Cannot open session {e}"))?;
self.set_current_commit(commit);
Ok(())
}

fn finalize_state(
&self,
commit: [u8; 32],
Expand Down

0 comments on commit e5692b5

Please sign in to comment.