diff --git a/convex-peer/src/main/java/convex/peer/Server.java b/convex-peer/src/main/java/convex/peer/Server.java index fa028a449..8da4355d2 100644 --- a/convex-peer/src/main/java/convex/peer/Server.java +++ b/convex-peer/src/main/java/convex/peer/Server.java @@ -631,6 +631,11 @@ public Peer persistPeerData() throws IOException { AMap newRootData = currentRootData.assoc(rootKey, peerData); newRootData=store.setRootData(newRootData).getValue(); + + // ensure specific values are persisted, might be needed for lookup + store.storeTopRef(peer.getGenesisState().getRef(), Ref.PERSISTED, null); + store.storeTopRef(peer.getBelief().getRef(), Ref.PERSISTED, null); + peerData=(AMap) newRootData.get(rootKey); log.debug( "Stored peer data with hash: {}", peerData.getHash().toHexString()); return Peer.fromData(getKeyPair(), peerData);