changeset 2490:5398b6f096b0 draft

Merge pull request #1254 from jgarzik/mempool-logging CTxMemPool: consolidate two frequently-printed debug.log lines into one
author Jeff Garzik <jgarzik@exmulti.com>
date Fri, 11 May 2012 07:53:08 -0700
parents 44413fcca3b4 (current diff) a7286be047fb (diff)
children 1a8ec9ad0a62
files
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -527,7 +527,7 @@
                 return error("CTxMemPool::accept() : FetchInputs found invalid tx %s", hash.ToString().substr(0,10).c_str());
             if (pfMissingInputs)
                 *pfMissingInputs = true;
-            return error("CTxMemPool::accept() : FetchInputs failed %s", hash.ToString().substr(0,10).c_str());
+            return false;
         }
 
         // Check for non-standard pay-to-script-hash in inputs
@@ -594,7 +594,9 @@
     if (ptxOld)
         EraseFromWallets(ptxOld->GetHash());
 
-    printf("CTxMemPool::accept() : accepted %s\n", hash.ToString().substr(0,10).c_str());
+    printf("CTxMemPool::accept() : accepted %s (poolsz %u)\n",
+           hash.ToString().substr(0,10).c_str(),
+           mapTx.size());
     return true;
 }
 
@@ -605,7 +607,6 @@
 
 bool CTxMemPool::addUnchecked(CTransaction &tx)
 {
-    printf("addUnchecked(): size %lu\n",  mapTx.size());
     // Add to memory pool without checking anything.  Don't call this directly,
     // call CTxMemPool::accept to properly check the transaction first.
     {