Skip to content

Commit

Permalink
Fix hapi initialization error (#8477)
Browse files Browse the repository at this point in the history
Signed-off-by: Kim Rader <[email protected]>
  • Loading branch information
kimbor authored Sep 9, 2023
1 parent 643ed5f commit b739722
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ public Set<StateDefinition> statesToCreate() {
public void migrate(@NonNull final MigrationContext ctx) {
// Reset the upgrade file hash to empty
// It should always be empty at genesis or after an upgrade, to indicate that no upgrade is in progress
// Nothing in state can ever be null, so use Bytes.EMPTY to indicate an empty hash
// Nothing in state can ever be null, so use Type.DEFAULT to indicate an empty hash
final var upgradeFileHashKeyState = ctx.newStates().<ProtoBytes>getSingleton(UPGRADE_FILE_HASH_KEY);
upgradeFileHashKeyState.put(ProtoBytes.DEFAULT);
final var freezeTimeKeyState = ctx.newStates().<Timestamp>getSingleton(FREEZE_TIME_KEY);
freezeTimeKeyState.put(Timestamp.DEFAULT);
final var lastFrozenTimeKeyState = ctx.newStates().<Timestamp>getSingleton(LAST_FROZEN_TIME_KEY);
lastFrozenTimeKeyState.put(Timestamp.DEFAULT);
}
};
}
Expand Down

0 comments on commit b739722

Please sign in to comment.