forked from Qortal/qortal
Minor comment re-org
This commit is contained in:
parent
e694a51cdd
commit
019cfdc1db
@ -350,10 +350,12 @@ public class Synchronizer {
|
|||||||
// Convert any leftover (post-common) block summaries into signatures to request from peer
|
// Convert any leftover (post-common) block summaries into signatures to request from peer
|
||||||
List<byte[]> peerBlockSignatures = peerBlockSummaries.stream().map(BlockSummaryData::getSignature).collect(Collectors.toList());
|
List<byte[]> peerBlockSignatures = peerBlockSummaries.stream().map(BlockSummaryData::getSignature).collect(Collectors.toList());
|
||||||
|
|
||||||
// Fetch remaining block signatures, if needed
|
// Calculate the total number of additional blocks this peer has beyond the common block
|
||||||
int additionalPeerBlocksAfterCommonBlock = peerHeight - commonBlockHeight; // Calculate the total number of additional blocks this peer has beyond the common block
|
int additionalPeerBlocksAfterCommonBlock = peerHeight - commonBlockHeight;
|
||||||
int numberSignaturesRequired = additionalPeerBlocksAfterCommonBlock - peerBlockSignatures.size(); // Subtract the number of signatures that we already have, as we don't need to request them again
|
// Subtract the number of signatures that we already have, as we don't need to request them again
|
||||||
|
int numberSignaturesRequired = additionalPeerBlocksAfterCommonBlock - peerBlockSignatures.size();
|
||||||
|
|
||||||
|
// Fetch remaining block signatures, if needed
|
||||||
if (numberSignaturesRequired > 0) {
|
if (numberSignaturesRequired > 0) {
|
||||||
byte[] latestPeerSignature = peerBlockSignatures.isEmpty() ? commonBlockSig : peerBlockSignatures.get(peerBlockSignatures.size() - 1);
|
byte[] latestPeerSignature = peerBlockSignatures.isEmpty() ? commonBlockSig : peerBlockSignatures.get(peerBlockSignatures.size() - 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user