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

Fix bug with initialRequestApplied #3512

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,18 @@ 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
dataStorage.addPersistableNetworkPayload(e, sender, false,
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);
}
Expand Down