Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sequenced pool synonym for legacy pool #6274

Merged
merged 9 commits into from
Dec 12, 2023
Original file line number Diff line number Diff line change
@@ -282,7 +282,10 @@ private void updateAccountStorageState(
worldStateUpdater.getAccountsToUpdate().get(updatedAddress);
final BonsaiAccount accountOriginal = accountValue.getPrior();
final Hash storageRoot =
(accountOriginal == null) ? Hash.EMPTY_TRIE_HASH : accountOriginal.getStorageRoot();
(accountOriginal == null
|| worldStateUpdater.getStorageToClear().contains(updatedAddress))
? Hash.EMPTY_TRIE_HASH
: accountOriginal.getStorageRoot();
final StoredMerklePatriciaTrie<Bytes, Bytes> storageTrie =
createTrie(
(location, key) ->
Original file line number Diff line number Diff line change
@@ -328,17 +328,6 @@ public void commit() {
}
if (tracked.getStorageWasCleared()) {
updatedAccount.clearStorage();
wrappedWorldView()
.getAllAccountStorage(updatedAddress, updatedAccount.getStorageRoot())
.forEach(
(keyHash, entryValue) -> {
final StorageSlotKey storageSlotKey =
new StorageSlotKey(Hash.wrap(keyHash), Optional.empty());
final UInt256 value = UInt256.fromBytes(RLP.decodeOne(entryValue));
pendingStorageUpdates.put(
storageSlotKey, new BonsaiValue<>(value, null, true));
});
updatedAccount.setStorageRoot(Hash.EMPTY_TRIE_HASH);
}
tracked.getUpdatedStorage().forEach(updatedAccount::setStorageValue);
}