Skip to content

Commit

Permalink
Refactor StorageRangeDataRequest to fix nodes saved variable (hyperle…
Browse files Browse the repository at this point in the history
…dger#6726)

* Refactor StorageRangeDataRequest

 -- Remove ununsed nbNodesSaved

Signed-off-by: Usman Saleem <usman@usmans.info>

* Fix import

Signed-off-by: Usman Saleem <usman@usmans.info>

* fix: Increment nodes saved variable

Signed-off-by: Usman Saleem <usman@usmans.info>

---------

Signed-off-by: Usman Saleem <usman@usmans.info>
  • Loading branch information
usmansaleem authored Mar 15, 2024
1 parent b239fb6 commit 22daf34
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,9 @@ protected int doPersist(
(location, hash, value) -> {
applyForStrategy(
updater,
onBonsai -> {
onBonsai.putAccountStorageTrieNode(accountHash, location, hash, value);
},
onForest -> {
onForest.putAccountStorageTrieNode(hash, value);
});
onBonsai -> onBonsai.putAccountStorageTrieNode(accountHash, location, hash, value),
onForest -> onForest.putAccountStorageTrieNode(hash, value));
nbNodesSaved.incrementAndGet();
};

final AtomicReference<StackTrie.FlatDatabaseUpdater> flatDatabaseUpdater =
Expand Down

0 comments on commit 22daf34

Please sign in to comment.