Base58 encode signatures in recently added logs.

This commit is contained in:
CalDescent 2021-03-21 14:12:04 +00:00
parent be21771e49
commit 35fd1d8455

View File

@ -402,7 +402,7 @@ public class Synchronizer {
while (peerBlocks.size() < peerBlockSignatures.size()) { while (peerBlocks.size() < peerBlockSignatures.size()) {
byte[] blockSignature = peerBlockSignatures.get(peerBlocks.size()); byte[] blockSignature = peerBlockSignatures.get(peerBlocks.size());
LOGGER.debug(String.format("Fetching block with signature %s", blockSignature)); LOGGER.debug(String.format("Fetching block with signature %.8s", Base58.encode(blockSignature)));
int blockHeightToRequest = commonBlockHeight + peerBlocks.size() + 1; // +1 because we are requesting the next block, beyond what we already have in the peerBlocks array int blockHeightToRequest = commonBlockHeight + peerBlocks.size() + 1; // +1 because we are requesting the next block, beyond what we already have in the peerBlocks array
Block newBlock = this.fetchBlock(repository, peer, blockSignature); Block newBlock = this.fetchBlock(repository, peer, blockSignature);
@ -431,7 +431,7 @@ public class Synchronizer {
// Reset retryCount because the last request succeeded // Reset retryCount because the last request succeeded
retryCount = 0; retryCount = 0;
LOGGER.debug(String.format("Received block with height %d, sig: %.8s", newBlock.getBlockData().getHeight(), newBlock.getSignature())); LOGGER.debug(String.format("Received block with height %d, sig: %.8s", newBlock.getBlockData().getHeight(), Base58.encode(blockSignature)));
// Transactions are transmitted without approval status so determine that now // Transactions are transmitted without approval status so determine that now
for (Transaction transaction : newBlock.getTransactions()) for (Transaction transaction : newBlock.getTransactions())