mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
Add some additional logging to give extra network insight.
This commit is contained in:
committed by
Gavin Andresen
parent
3779de9d89
commit
1c53d0a4fb
14
src/main.cpp
14
src/main.cpp
@@ -818,9 +818,6 @@ bool CTxMemPool::accept(CValidationState &state, CTransaction &tx, bool fCheckIn
|
||||
EraseFromWallets(ptxOld->GetHash());
|
||||
SyncWithWallets(hash, tx, NULL, true);
|
||||
|
||||
printf("CTxMemPool::accept() : accepted %s (poolsz %"PRIszu")\n",
|
||||
hash.ToString().c_str(),
|
||||
mapTx.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3288,7 +3285,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
|
||||
pfrom->fSuccessfullyConnected = true;
|
||||
|
||||
printf("receive version message: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString().c_str(), addrFrom.ToString().c_str(), pfrom->addr.ToString().c_str());
|
||||
printf("receive version message: %s: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", pfrom->strSubVer.c_str(), pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString().c_str(), addrFrom.ToString().c_str(), pfrom->addr.ToString().c_str());
|
||||
|
||||
cPeerBlockCounts.input(pfrom->nStartingHeight);
|
||||
}
|
||||
@@ -3536,6 +3533,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
vWorkQueue.push_back(inv.hash);
|
||||
vEraseQueue.push_back(inv.hash);
|
||||
|
||||
printf("AcceptToMemoryPool: %s %s : accepted %s (poolsz %"PRIszu")\n",
|
||||
pfrom->addr.ToString().c_str(), pfrom->strSubVer.c_str(),
|
||||
tx.GetHash().ToString().c_str(),
|
||||
mempool.mapTx.size());
|
||||
|
||||
// Recursively process any orphan transactions that depended on this one
|
||||
for (unsigned int i = 0; i < vWorkQueue.size(); i++)
|
||||
{
|
||||
@@ -3583,8 +3585,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
}
|
||||
int nDoS = 0;
|
||||
if (state.IsInvalid(nDoS))
|
||||
{
|
||||
printf("%s from %s %s was not accepted into the memory pool\n", tx.GetHash().ToString().c_str(),
|
||||
pfrom->addr.ToString().c_str(), pfrom->strSubVer.c_str());
|
||||
if (nDoS > 0)
|
||||
pfrom->Misbehaving(nDoS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user