Skip to content

Commit

Permalink
fixup! Merge branch 'tomas/refactor-state' (#2606)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Feb 23, 2024
1 parent 903281e commit d41e737
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions crates/apps/src/lib/node/ledger/shell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,12 +637,12 @@ where
pub fn commit(&mut self) -> response::Commit {
self.bump_last_processed_eth_block();

self.wl_storage
self.state
.commit_block()
.expect("Encountered a storage error while committing a block");

let merkle_root = self.wl_storage.storage.merkle_root();
let committed_height = self.wl_storage.storage.get_last_block_height();
let merkle_root = self.state.in_mem().merkle_root();
let committed_height = self.state.in_mem().get_last_block_height();
tracing::info!(
"Committed block hash: {merkle_root}, height: {committed_height}",
);
Expand Down
4 changes: 2 additions & 2 deletions crates/sdk/src/queries/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ where
D: 'static + DB + for<'iter> DBIter<'iter> + Sync,
H: 'static + StorageHasher + Sync,
{
ctx.wl_storage
.storage
ctx.state
.in_mem()
.block
.pred_epochs
.first_block_heights
Expand Down
4 changes: 2 additions & 2 deletions crates/tests/src/integration/masp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1963,8 +1963,8 @@ fn multiple_unfetched_txs_same_block() -> Result<()> {
.shell
.lock()
.unwrap()
.wl_storage
.storage
.state
.in_mem()
.native_token
.clone();
let mut txs = vec![];
Expand Down

0 comments on commit d41e737

Please sign in to comment.