mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-03 05:57:21 +00:00
Cleanup: use varargs methods in slf4j rather than new Object[]{}
This commit is contained in:
@@ -464,7 +464,7 @@ public abstract class AbstractBlockChain {
|
||||
int splitPointHeight = splitPoint.getHeight();
|
||||
String splitPointHash = splitPoint.getHeader().getHashAsString();
|
||||
log.info("Block forks the chain at height {}/block {}, but it did not cause a reorganize:\n{}",
|
||||
new Object[]{splitPointHeight, splitPointHash, newBlock.getHeader().getHashAsString()});
|
||||
splitPointHeight, splitPointHash, newBlock.getHeader().getHashAsString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -186,11 +186,8 @@ public class BitcoinSerializer {
|
||||
}
|
||||
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Received {} byte '{}' message: {}", new Object[]{
|
||||
header.size,
|
||||
header.command,
|
||||
Utils.bytesToHexString(payloadBytes)
|
||||
});
|
||||
log.debug("Received {} byte '{}' message: {}", header.size, header.command,
|
||||
Utils.bytesToHexString(payloadBytes));
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -189,7 +189,7 @@ public class MemoryPool {
|
||||
// We saw it before and kept it around. Hand back the canonical copy.
|
||||
tx = transaction;
|
||||
log.info("{}: Provided with a transaction downloaded before: [{}] {}",
|
||||
new Object[]{byPeer, tx.getConfidence().numBroadcastPeers(), tx.getHash()});
|
||||
byPeer, tx.getConfidence().numBroadcastPeers(), tx.getHash());
|
||||
}
|
||||
markBroadcast(byPeer, tx);
|
||||
return tx;
|
||||
@@ -201,7 +201,7 @@ public class MemoryPool {
|
||||
entry.addresses = null;
|
||||
TransactionConfidence confidence = tx.getConfidence();
|
||||
log.debug("{}: Adding tx [{}] {} to the memory pool",
|
||||
new Object[]{byPeer, confidence.numBroadcastPeers(), tx.getHashAsString()});
|
||||
byPeer, confidence.numBroadcastPeers(), tx.getHashAsString());
|
||||
for (PeerAddress a : addrs) {
|
||||
markBroadcast(a, tx);
|
||||
}
|
||||
@@ -240,7 +240,7 @@ public class MemoryPool {
|
||||
if (tx != null) {
|
||||
markBroadcast(byPeer, tx);
|
||||
log.debug("{}: Peer announced transaction we have seen before [{}] {}",
|
||||
new Object[]{byPeer, tx.getConfidence().numBroadcastPeers(), tx.getHashAsString()});
|
||||
byPeer, tx.getConfidence().numBroadcastPeers(), tx.getHashAsString());
|
||||
} else {
|
||||
// The inv is telling us about a transaction that we previously downloaded, and threw away because
|
||||
// nothing found it interesting enough to keep around. So do nothing.
|
||||
@@ -249,7 +249,7 @@ public class MemoryPool {
|
||||
checkNotNull(entry.addresses);
|
||||
entry.addresses.add(byPeer);
|
||||
log.debug("{}: Peer announced transaction we have seen announced before [{}] {}",
|
||||
new Object[]{byPeer, entry.addresses.size(), hash});
|
||||
byPeer, entry.addresses.size(), hash);
|
||||
}
|
||||
} else {
|
||||
// This TX has never been seen before.
|
||||
|
||||
@@ -670,8 +670,7 @@ public class Peer {
|
||||
List<ListenableFuture<Object>> childFutures = Lists.newLinkedList();
|
||||
for (Transaction tx : transactions) {
|
||||
if (tx == null) continue;
|
||||
log.info("{}: Downloaded dependency of {}: {}", new Object[]{vAddress,
|
||||
rootTxHash, tx.getHashAsString()});
|
||||
log.info("{}: Downloaded dependency of {}: {}", vAddress, rootTxHash, tx.getHashAsString());
|
||||
results.add(tx);
|
||||
// Now recurse into the dependencies of this transaction too.
|
||||
childFutures.add(downloadDependenciesInternal(tx, marker, results));
|
||||
@@ -1162,8 +1161,8 @@ public class Peer {
|
||||
log.info("blockChainDownloadLocked({}): ignoring duplicated request", toHash.toString());
|
||||
return;
|
||||
}
|
||||
log.debug("{}: blockChainDownloadLocked({}) current head = {}", new Object[]{toString(),
|
||||
toHash.toString(), chainHead.getHeader().getHashAsString()});
|
||||
log.debug("{}: blockChainDownloadLocked({}) current head = {}",
|
||||
toString(), toHash.toString(), chainHead.getHeader().getHashAsString());
|
||||
StoredBlock cursor = chainHead;
|
||||
for (int i = 100; cursor != null && i > 0; i--) {
|
||||
blockLocator.add(cursor.getHeader().getHash());
|
||||
|
||||
@@ -144,14 +144,13 @@ public class TCPNetworkConnection implements NetworkConnection {
|
||||
versionMessage = (VersionMessage) m;
|
||||
// Switch to the new protocol version.
|
||||
int peerVersion = versionMessage.clientVersion;
|
||||
log.info("Connected to {}: version={}, subVer='{}', services=0x{}, time={}, blocks={}", new Object[] {
|
||||
log.info("Connected to {}: version={}, subVer='{}', services=0x{}, time={}, blocks={}",
|
||||
getPeerAddress().getAddr().getHostAddress(),
|
||||
peerVersion,
|
||||
versionMessage.subVer,
|
||||
versionMessage.localServices,
|
||||
new Date(versionMessage.time * 1000),
|
||||
versionMessage.bestHeight
|
||||
});
|
||||
versionMessage.bestHeight);
|
||||
// Now it's our turn ...
|
||||
// Send an ACK message stating we accept the peers protocol version.
|
||||
write(channel, new VersionAck());
|
||||
|
||||
@@ -581,8 +581,8 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||
return;
|
||||
AnalysisResult analysis = analyzeTransactionAndDependencies(tx, dependencies);
|
||||
if (analysis.timeLocked != null && !doesAcceptTimeLockedTransactions()) {
|
||||
log.warn("Transaction {}, dependency of {} has a time lock value of {}", new Object[]{
|
||||
analysis.timeLocked.getHashAsString(), tx.getHashAsString(), analysis.timeLocked.getLockTime()});
|
||||
log.warn("Transaction {}, dependency of {} has a time lock value of {}",
|
||||
analysis.timeLocked.getHashAsString(), tx.getHashAsString(), analysis.timeLocked.getLockTime());
|
||||
return;
|
||||
}
|
||||
BigInteger valueSentToMe = tx.getValueSentToMe(this);
|
||||
@@ -772,9 +772,9 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi
|
||||
BigInteger valueSentToMe = tx.getValueSentToMe(this);
|
||||
BigInteger valueDifference = valueSentToMe.subtract(valueSentFromMe);
|
||||
|
||||
log.info("Received tx{} for {} BTC: {} [{}] in block {}", new Object[]{sideChain ? " on a side chain" : "",
|
||||
log.info("Received tx{} for {} BTC: {} [{}] in block {}", sideChain ? " on a side chain" : "",
|
||||
bitcoinValueToFriendlyString(valueDifference), tx.getHashAsString(), relativityOffset,
|
||||
block != null ? block.getHeader().getHash() : "(unit test)"});
|
||||
block != null ? block.getHeader().getHash() : "(unit test)");
|
||||
|
||||
onWalletChangedSuppressions++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user