mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Improve logs for block requests
This commit is contained in:
parent
c8fd897e54
commit
536a29f76a
@ -128,7 +128,7 @@ public class RequestBlocksHandler implements MessageListener {
|
||||
},
|
||||
TIMEOUT_MIN, TimeUnit.MINUTES);
|
||||
|
||||
log.info("We request blocks from peer {} from block height {}.", nodeAddress, getBlocksRequest.getFromBlockHeight());
|
||||
log.info("\n\n>> We request blocks from peer {} from block height {}.\n", nodeAddress, getBlocksRequest.getFromBlockHeight());
|
||||
|
||||
networkNode.addMessageListener(this);
|
||||
|
||||
@ -136,7 +136,7 @@ public class RequestBlocksHandler implements MessageListener {
|
||||
Futures.addCallback(future, new FutureCallback<>() {
|
||||
@Override
|
||||
public void onSuccess(Connection connection) {
|
||||
log.info("Sending of GetBlocksRequest message to peer {} succeeded.", nodeAddress.getFullAddress());
|
||||
log.debug("Sending of GetBlocksRequest message to peer {} succeeded.", nodeAddress.getFullAddress());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -190,7 +190,9 @@ public class RequestBlocksHandler implements MessageListener {
|
||||
}
|
||||
|
||||
terminate();
|
||||
log.info("We received from peer {} a BlocksResponse with {} blocks",
|
||||
log.info("\n#################################################################\n" +
|
||||
"We received from peer {} a BlocksResponse with {} blocks" +
|
||||
"\n#################################################################\n",
|
||||
nodeAddress.getFullAddress(), getBlocksResponse.getBlocks().size());
|
||||
listener.onComplete(getBlocksResponse);
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public final class GetBlocksResponse extends NetworkEnvelope implements DirectMe
|
||||
List<RawBlock> list = proto.getRawBlocksList().stream()
|
||||
.map(RawBlock::fromProto)
|
||||
.collect(Collectors.toList());
|
||||
log.info("Received a GetBlocksResponse with {} blocks and {} kB size", list.size(), proto.getSerializedSize() / 1000d);
|
||||
log.info("\n\n<< Received a GetBlocksResponse with {} blocks and {} kB size\n", list.size(), proto.getSerializedSize() / 1000d);
|
||||
return new GetBlocksResponse(proto.getRawBlocksList().isEmpty() ?
|
||||
new ArrayList<>() :
|
||||
list,
|
||||
|
@ -364,15 +364,15 @@ public class RequestDataManager implements MessageListener, ConnectionListener,
|
||||
log.info("DataResponse did not contain all data, so we repeat request until we got all data");
|
||||
UserThread.runAfter(() -> requestData(nodeAddress, remainingNodeAddresses), 2);
|
||||
} else {
|
||||
log.warn("#################################################################\n" +
|
||||
log.warn("\n#################################################################\n" +
|
||||
"Loading initial data did not complete after 20 repeated requests. \n" +
|
||||
"#################################################################");
|
||||
"#################################################################\n");
|
||||
checkNotNull(listener).onDataReceived();
|
||||
}
|
||||
} else {
|
||||
log.info("#################################################################\n" +
|
||||
log.info("\n#################################################################\n" +
|
||||
"Loading initial data completed\n" +
|
||||
"#################################################################");
|
||||
"#################################################################\n");
|
||||
checkNotNull(listener).onDataReceived();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user