From f51ee91a2ce39ee5659ebc45f60bb7fcb6cc3db5 Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Thu, 5 Feb 2015 11:29:13 -0700 Subject: [PATCH] track requests per IX --- src/instantx.cpp | 8 ++++++++ src/net.cpp | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/instantx.cpp b/src/instantx.cpp index a1053a9f6..93372326d 100644 --- a/src/instantx.cpp +++ b/src/instantx.cpp @@ -316,6 +316,14 @@ bool ProcessConsensusVote(CConsensusVote& ctx) if (i != mapTxLocks.end()){ (*i).second.AddSignature(ctx); +#ifdef ENABLE_WALLET + if(pwalletMain){ + //when we get back signatures, we'll count them as requests. Otherwise the client will think it didn't propagate. + if(pwalletMain->mapRequestCount.count(ctx.txHash)) + pwalletMain->mapRequestCount[ctx.txHash]++; + } +#endif + if(fDebug) LogPrintf("InstantX::ProcessConsensusVote - Transaction Lock Votes %d - %s !\n", (*i).second.CountSignatures(), ctx.GetHash().ToString().c_str()); if((*i).second.CountSignatures() >= INSTANTX_SIGNATURES_REQUIRED){ diff --git a/src/net.cpp b/src/net.cpp index af9663959..30708fc41 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1869,9 +1869,6 @@ void RelayTransactionLockReq(const CTransaction& tx, const uint256& hash, bool r if(!relayToAll && !pnode->fRelayTxes) continue; - //there's no requests for transactions locks, so we should show it was propagated correctly - //pwalletMain->mapRequestCount[tx.GetHash()]++; - pnode->PushMessage("txlreq", tx); }