Skip to content

Commit 133dce6

Browse files
Jeff GarzikJeff Garzik
authored andcommitted
CTxMemPool: consolidate two frequently-printed debug.log lines into one
Previously, a single TX would trigger two log lines in quick succession, addUnchecked(): size 152 CTxMemPool::accept() : accepted c4cfdd48b7 After this change, only one log line is used: CTxMemPool::accept() : accepted 98885e65db (poolsz 26)
1 parent e6fd96f commit 133dce6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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)