track requests per IX

This commit is contained in:
Evan Duffield 2015-02-05 11:29:13 -07:00
parent ae0b956d82
commit f51ee91a2c
2 changed files with 8 additions and 3 deletions

View File

@ -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){

View File

@ -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);
}