@@ -797,9 +797,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
797
797
g_signals.EraseTransaction (ptxOld->GetHash ());
798
798
g_signals.SyncTransaction (hash, tx, NULL );
799
799
800
- LogPrint (" mempool" , " AcceptToMemoryPool: : accepted %s (poolsz %" PRIszu" )\n " ,
801
- hash.ToString ().c_str (),
802
- pool.mapTx .size ());
803
800
return true ;
804
801
}
805
802
@@ -3100,8 +3097,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
3100
3097
pfrom->nVersion = 300 ;
3101
3098
if (!vRecv.empty ())
3102
3099
vRecv >> addrFrom >> nNonce;
3103
- if (!vRecv.empty ())
3100
+ if (!vRecv.empty ()) {
3104
3101
vRecv >> pfrom->strSubVer ;
3102
+ pfrom->cleanSubVer = SanitizeString (pfrom->strSubVer );
3103
+ }
3105
3104
if (!vRecv.empty ())
3106
3105
vRecv >> pfrom->nStartingHeight ;
3107
3106
if (!vRecv.empty ())
@@ -3168,7 +3167,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
3168
3167
3169
3168
pfrom->fSuccessfullyConnected = true ;
3170
3169
3171
- LogPrintf (" 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 ());
3170
+ LogPrintf (" receive version message: %s: version %d, blocks=%d, us=%s, them=%s, peer=%s\n " , pfrom-> cleanSubVer . c_str () , pfrom->nVersion , pfrom->nStartingHeight , addrMe.ToString ().c_str (), addrFrom.ToString ().c_str (), pfrom->addr .ToString ().c_str ());
3172
3171
3173
3172
AddTimeData (pfrom->addr , nTime);
3174
3173
@@ -3427,6 +3426,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
3427
3426
vWorkQueue.push_back (inv.hash );
3428
3427
vEraseQueue.push_back (inv.hash );
3429
3428
3429
+
3430
+ LogPrint (" mempool" , " AcceptToMemoryPool: %s %s : accepted %s (poolsz %" PRIszu" )\n " ,
3431
+ pfrom->addr .ToString ().c_str (), pfrom->cleanSubVer .c_str (),
3432
+ tx.GetHash ().ToString ().c_str (),
3433
+ mempool.mapTx .size ());
3434
+
3430
3435
// Recursively process any orphan transactions that depended on this one
3431
3436
for (unsigned int i = 0 ; i < vWorkQueue.size (); i++)
3432
3437
{
@@ -3475,7 +3480,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
3475
3480
}
3476
3481
int nDoS = 0 ;
3477
3482
if (state.IsInvalid (nDoS))
3478
- {
3483
+ {
3484
+ LogPrint (" mempool" , " %s from %s %s was not accepted into the memory pool: %s\n " , tx.GetHash ().ToString ().c_str (),
3485
+ pfrom->addr .ToString ().c_str (), pfrom->cleanSubVer .c_str (),
3486
+ state.GetRejectReason ().c_str ());
3479
3487
pfrom->PushMessage (" reject" , strCommand, state.GetRejectCode (),
3480
3488
state.GetRejectReason (), inv.hash );
3481
3489
if (nDoS > 0 )
@@ -3612,7 +3620,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
3612
3620
if (!(sProblem .empty ())) {
3613
3621
LogPrint (" net" , " pong %s %s: %s, %" PRIx64" expected, %" PRIx64" received, %" PRIszu" bytes\n " ,
3614
3622
pfrom->addr .ToString ().c_str (),
3615
- pfrom->strSubVer .c_str (),
3623
+ pfrom->cleanSubVer .c_str (),
3616
3624
sProblem .c_str (),
3617
3625
pfrom->nPingNonceSent ,
3618
3626
nonce,
0 commit comments