Skip to content

Commit

Permalink
Use networkNode.sendMessage instead of connection.sendMessage as the …
Browse files Browse the repository at this point in the history
…call on connection is blocking.

This was likely a major bug for seed nodes that at sending hash responses the main thread got blocked.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
  • Loading branch information
HenrikJannsen committed Dec 13, 2022
1 parent ac575ce commit d4b6965
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void sendGetStateHashesResponse(Connection connection, int nonce, List<St
Res getStateHashesResponse = getGetStateHashesResponse(nonce, stateHashes);
log.info("Send {} with {} stateHashes to peer {}", getStateHashesResponse.getClass().getSimpleName(),
stateHashes.size(), connection.getPeersNodeAddressOptional());
connection.sendMessage(getStateHashesResponse);
networkNode.sendMessage(connection, getStateHashesResponse);
}

public void requestHashesFromAllConnectedSeedNodes(int fromHeight) {
Expand Down

0 comments on commit d4b6965

Please sign in to comment.