Refactor StorageRangeDataRequest to fix nodes saved variable (#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>
pull/6744/head
Usman Saleem 8 months ago committed by GitHub
parent b239fb6099
commit 22daf346ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/request/StorageRangeDataRequest.java

@ -100,12 +100,9 @@ public class StorageRangeDataRequest extends SnapDataRequest {
(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 =

Loading…
Cancel
Save