aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2012-05-17 20:36:55 -0400
committerGavin Andresen <gavinandresen@gmail.com>2012-06-19 14:49:38 -0400
commit87593b98379544f3dadc2529ea0817d9ebefc4ce (patch)
tree50541d92cc1808666a4259a39c8ab502287100d9
parent4aa8021a9651257605e8c16df2973eee8aebe575 (diff)
Make orphan logging more verbose, displaying mapOrphanTransactions.size()
Old log message: storing orphan tx df2244f6bc New log message: storing orphan tx df2244f6bc (mapsz 51) Also, trim a few trailing whitespace in main.cpp.
-rw-r--r--src/main.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 427e435a90..ae13115c10 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -718,7 +718,7 @@ bool CWalletTx::AcceptWalletTransaction(CTxDB& txdb, bool fCheckInputs)
return false;
}
-bool CWalletTx::AcceptWalletTransaction()
+bool CWalletTx::AcceptWalletTransaction()
{
CTxDB txdb("r");
return AcceptWalletTransaction(txdb);
@@ -2596,7 +2596,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
}
else if (fMissingInputs)
{
- printf("storing orphan tx %s\n", inv.hash.ToString().substr(0,10).c_str());
+ printf("storing orphan tx %s (mapsz %d)\n",
+ inv.hash.ToString().substr(0,10).c_str(),
+ mapOrphanTransactions.size() + 1);
AddOrphanTx(vMsg);
// DoS prevention: do not allow mapOrphanTransactions to grow unbounded
@@ -2862,7 +2864,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
if (pto->nVersion == 0)
return true;
- // Keep-alive ping. We send a nonce of zero because we don't use it anywhere
+ // Keep-alive ping. We send a nonce of zero because we don't use it anywhere
// right now.
if (pto->nLastSend && GetTime() - pto->nLastSend > 30 * 60 && pto->vSend.empty()) {
if (pto->nVersion > BIP0031_VERSION)
@@ -3062,7 +3064,7 @@ void SHA256Transform(void* pstate, void* pinput, const void* pinit)
ctx.h[i] = ((uint32_t*)pinit)[i];
SHA256_Update(&ctx, data, sizeof(data));
- for (int i = 0; i < 8; i++)
+ for (int i = 0; i < 8; i++)
((uint32_t*)pstate)[i] = ctx.h[i];
}