Skip to content

Commit 271f9fa

Browse files
author
Jeff Garzik
committed
Merge pull request #1254 from jgarzik/mempool-logging
CTxMemPool: consolidate two frequently-printed debug.log lines into one
2 parents 2692ed3 + 33a53bc commit 271f9fa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs,
527527
return error("CTxMemPool::accept() : FetchInputs found invalid tx %s", hash.ToString().substr(0,10).c_str());
528528
if (pfMissingInputs)
529529
*pfMissingInputs = true;
530-
return error("CTxMemPool::accept() : FetchInputs failed %s", hash.ToString().substr(0,10).c_str());
530+
return false;
531531
}
532532

533533
// Check for non-standard pay-to-script-hash in inputs
@@ -594,7 +594,9 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs,
594594
if (ptxOld)
595595
EraseFromWallets(ptxOld->GetHash());
596596

597-
printf("CTxMemPool::accept() : accepted %s\n", hash.ToString().substr(0,10).c_str());
597+
printf("CTxMemPool::accept() : accepted %s (poolsz %u)\n",
598+
hash.ToString().substr(0,10).c_str(),
599+
mapTx.size());
598600
return true;
599601
}
600602

@@ -605,7 +607,6 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
605607

606608
bool CTxMemPool::addUnchecked(CTransaction &tx)
607609
{
608-
printf("addUnchecked(): size %lu\n", mapTx.size());
609610
// Add to memory pool without checking anything. Don't call this directly,
610611
// call CTxMemPool::accept to properly check the transaction first.
611612
{

0 commit comments

Comments
 (0)