Skip to content

Commit

Permalink
06651 Added missing rehash for VirtualMap leaves (#6653)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Malygin <ivan@swirldslabs.com>
  • Loading branch information
imalygin authored and iwsimon committed May 19, 2023
1 parent 9f1a8e0 commit aa0e9b5
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -1271,10 +1271,22 @@ public void init(

if (trigger == InitTrigger.GENESIS) {
genesisInit();
} else {
logger.info(LOGM_STARTUP, "Doing full rehash for the initialized VirtualMaps");
fullLeafRehash(getVirtualMap());
fullLeafRehash(getVirtualMapForSmartContracts());
fullLeafRehash(getVirtualMapForSmartContractsByteCode());
logger.info(LOGM_STARTUP, "Full rehash is complete");
}
this.invalidateHash();
}

private void fullLeafRehash(VirtualMap<?, ?> virtualMap) {
if (virtualMap != null) {
virtualMap.fullLeafRehash();
}
}

private void expandSignatures(final Transaction trans) {
if (getConfig().isAppendSig()) {
try {
Expand Down

0 comments on commit aa0e9b5

Please sign in to comment.