Skip to content

Commit

Permalink
add more logging, drop forced commit interval to 5k
Browse files Browse the repository at this point in the history
Signed-off-by: garyschulte <[email protected]>
  • Loading branch information
garyschulte committed Dec 5, 2024
1 parent 2cd2b8f commit f81531e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class RebuildBonsaiStateTrieSubCommand implements Runnable {
private static final Logger LOG = LoggerFactory.getLogger(RebuildBonsaiStateTrieSubCommand.class);
private static final Hash HASH_LAST =
Hash.wrap(Bytes32.leftPad(Bytes.fromHexString("FF"), (byte) 0xFF));
static final long FORCED_COMMIT_INTERVAL = 50_000L;
static final long FORCED_COMMIT_INTERVAL = 5_000L;

@SuppressWarnings("unused")
@ParentCommand
Expand Down Expand Up @@ -256,6 +256,7 @@ Hash rebuildAccountTrie(

// commit the account storage trie
if (accountStorageCount++ % FORCED_COMMIT_INTERVAL == 0) {
LOG.info("interim commit for account hash {}, at {}", accountHash, storagePair.getFirst());
accountStorageCommit.accept(accountStorageTrie);
accountStorageTx.commitAndReopen();
// new trie with new root, GC trie nodes
Expand Down

0 comments on commit f81531e

Please sign in to comment.