forked from Qortal/qortal
Various logging improvements and fixes.
This commit is contained in:
parent
374f6b8d52
commit
d8cbec41d2
@ -218,7 +218,7 @@ public class ArbitraryDataTransactionBuilder {
|
||||
// Get chunks metadata file
|
||||
ArbitraryDataFile metadataFile = arbitraryDataFile.getMetadataFile();
|
||||
if (metadataFile == null && arbitraryDataFile.chunkCount() > 1) {
|
||||
throw new DataException(String.format("Chunks metadata data file is null but there are %i chunks", arbitraryDataFile.chunkCount()));
|
||||
throw new DataException(String.format("Chunks metadata data file is null but there are %d chunks", arbitraryDataFile.chunkCount()));
|
||||
}
|
||||
|
||||
String digest58 = arbitraryDataFile.digest58();
|
||||
|
@ -229,6 +229,7 @@ public class ArbitraryDataFileListManager {
|
||||
byte[] signature = arbitraryTransactionData.getSignature();
|
||||
String signature58 = Base58.encode(signature);
|
||||
|
||||
// Require an NTP sync
|
||||
Long now = NTP.getTime();
|
||||
if (now == null) {
|
||||
return false;
|
||||
@ -246,7 +247,8 @@ public class ArbitraryDataFileListManager {
|
||||
}
|
||||
this.addToSignatureRequests(signature58, true, false);
|
||||
|
||||
LOGGER.debug(String.format("Sending data file list request for signature %s...", Base58.encode(signature)));
|
||||
List<Peer> handshakedPeers = Network.getInstance().getHandshakedPeers();
|
||||
LOGGER.debug(String.format("Sending data file list request for signature %s to %d peers...", signature58, handshakedPeers.size()));
|
||||
|
||||
// Build request
|
||||
Message getArbitraryDataFileListMessage = new GetArbitraryDataFileListMessage(signature, now, 0);
|
||||
@ -402,10 +404,11 @@ public class ArbitraryDataFileListManager {
|
||||
|
||||
// If we've seen this request recently, then ignore
|
||||
if (arbitraryDataFileListRequests.putIfAbsent(message.getId(), newEntry) != null) {
|
||||
LOGGER.debug("Ignoring hash list request from peer {} for signature {}", peer, signature58);
|
||||
return;
|
||||
}
|
||||
|
||||
LOGGER.debug("Received hash list request from peer {} for signature {}", peer, Base58.encode(signature));
|
||||
LOGGER.debug("Received hash list request from peer {} for signature {}", peer, signature58);
|
||||
|
||||
List<byte[]> hashes = new ArrayList<>();
|
||||
ArbitraryTransactionData transactionData = null;
|
||||
|
@ -135,7 +135,7 @@ public class HSQLDBArbitraryRepository implements ArbitraryRepository {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new IllegalStateException(String.format("Supplied data is larger than maximum size (%i bytes). Please use ArbitraryDataWriter.", MAX_RAW_DATA_SIZE));
|
||||
throw new IllegalStateException(String.format("Supplied data is larger than maximum size (%d bytes). Please use ArbitraryDataWriter.", MAX_RAW_DATA_SIZE));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user