Improve loggings

This commit is contained in:
Manfred Karrer 2016-02-01 20:11:03 +01:00
parent 5efd69bad4
commit 4232a10f47
4 changed files with 2 additions and 15 deletions

View file

@ -61,14 +61,4 @@ public final class SealedAndSigned implements Serializable {
result = 31 * result + (sigPublicKey != null ? sigPublicKey.hashCode() : 0); result = 31 * result + (sigPublicKey != null ? sigPublicKey.hashCode() : 0);
return result; return result;
} }
@Override
public String toString() {
return "SealedAndSigned{" +
"encryptedSecretKey.hashCode()=" + Arrays.toString(encryptedSecretKey).hashCode() +
", encryptedPayloadWithHmac.hashCode()=" + Arrays.toString(encryptedPayloadWithHmac).hashCode() +
", signature.hashCode()=" + Arrays.toString(signature).hashCode() +
", sigPublicKey.hashCode()=" + sigPublicKey.hashCode() +
'}';
}
} }

View file

@ -482,7 +482,6 @@ public class TradeWalletService {
// Add all outputs from offerersDepositTx to depositTx // Add all outputs from offerersDepositTx to depositTx
offerersDepositTx.getOutputs().forEach(depositTx::addOutput); offerersDepositTx.getOutputs().forEach(depositTx::addOutput);
printTxWithInputs("offerersDepositTx", offerersDepositTx); printTxWithInputs("offerersDepositTx", offerersDepositTx);
// Sign inputs // Sign inputs
@ -625,7 +624,6 @@ public class TradeWalletService {
TransactionInput input = payoutTx.getInput(0); TransactionInput input = payoutTx.getInput(0);
input.setScriptSig(inputScript); input.setScriptSig(inputScript);
printTxWithInputs("payoutTx", payoutTx);
verifyTransaction(payoutTx); verifyTransaction(payoutTx);
checkWalletConsistency(); checkWalletConsistency();
checkScriptSig(payoutTx, input, 0); checkScriptSig(payoutTx, input, 0);
@ -784,7 +782,6 @@ public class TradeWalletService {
TransactionInput input = payoutTx.getInput(0); TransactionInput input = payoutTx.getInput(0);
input.setScriptSig(inputScript); input.setScriptSig(inputScript);
printTxWithInputs("disputed payoutTx", payoutTx);
verifyTransaction(payoutTx); verifyTransaction(payoutTx);
checkWalletConsistency(); checkWalletConsistency();
checkScriptSig(payoutTx, input, 0); checkScriptSig(payoutTx, input, 0);

View file

@ -321,7 +321,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis
@Override @Override
public void onMessage(Message message, Connection connection) { public void onMessage(Message message, Connection connection) {
if (message instanceof PrefixedSealedAndSignedMessage) { if (message instanceof PrefixedSealedAndSignedMessage) {
Log.traceCall(message.toString() + "\n\tconnection=" + connection); Log.traceCall("\n\t" + message.toString() + "\n\tconnection=" + connection);
// Seed nodes don't have set the encryptionService // Seed nodes don't have set the encryptionService
if (optionalEncryptionService.isPresent()) { if (optionalEncryptionService.isPresent()) {
try { try {

View file

@ -127,7 +127,7 @@ public abstract class NetworkNode implements MessageListener, ConnectionListener
} }
public SettableFuture<Connection> sendMessage(Connection connection, Message message) { public SettableFuture<Connection> sendMessage(Connection connection, Message message) {
Log.traceCall("message=" + message + "\n\tconnection=" + connection); Log.traceCall("\n\tmessage=" + message + "\n\tconnection=" + connection);
// connection.sendMessage might take a bit (compression, write to stream), so we use a thread to not block // connection.sendMessage might take a bit (compression, write to stream), so we use a thread to not block
ListenableFuture<Connection> future = executorService.submit(() -> { ListenableFuture<Connection> future = executorService.submit(() -> {
Thread.currentThread().setName("NetworkNode:SendMessage-to-" + connection.getUid()); Thread.currentThread().setName("NetworkNode:SendMessage-to-" + connection.getUid());