From 22daf346eef430a2b029a9bc833c1818452b31d9 Mon Sep 17 00:00:00 2001 From: Usman Saleem Date: Fri, 15 Mar 2024 13:55:39 +1000 Subject: [PATCH] Refactor StorageRangeDataRequest to fix nodes saved variable (#6726) * Refactor StorageRangeDataRequest -- Remove ununsed nbNodesSaved Signed-off-by: Usman Saleem * Fix import Signed-off-by: Usman Saleem * fix: Increment nodes saved variable Signed-off-by: Usman Saleem --------- Signed-off-by: Usman Saleem --- .../sync/snapsync/request/StorageRangeDataRequest.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/request/StorageRangeDataRequest.java b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/request/StorageRangeDataRequest.java index 751d8e3ac2d..0cb70b54635 100644 --- a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/request/StorageRangeDataRequest.java +++ b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/request/StorageRangeDataRequest.java @@ -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 flatDatabaseUpdater =