diff --git a/p2p/src/main/java/bisq/network/p2p/peers/getdata/RequestDataHandler.java b/p2p/src/main/java/bisq/network/p2p/peers/getdata/RequestDataHandler.java index b699138e5f5..3f10d6511d6 100644 --- a/p2p/src/main/java/bisq/network/p2p/peers/getdata/RequestDataHandler.java +++ b/p2p/src/main/java/bisq/network/p2p/peers/getdata/RequestDataHandler.java @@ -246,7 +246,7 @@ public void onMessage(NetworkEnvelope networkEnvelope, Connection connection) { // We only apply it once from first response if (!initialRequestApplied) { dataStorage.addPersistableNetworkPayloadFromInitialRequest(e); - initialRequestApplied = true; + } } else { // We don't broadcast here as we are only connected to the seed node and would be pointless @@ -254,6 +254,10 @@ public void onMessage(NetworkEnvelope networkEnvelope, Connection connection) { false, false, false); } }); + + // We set initialRequestApplied to true after the loop, otherwise we would only process 1 entry + initialRequestApplied = true; + log.info("Processing {} persistableNetworkPayloads took {} ms.", persistableNetworkPayloadSet.size(), System.currentTimeMillis() - ts); }