Skip to content

Commit

Permalink
Merge pull request #4460
Browse files Browse the repository at this point in the history
604ee2a Remove tx from AlreadyAskedFor list once we receive it, not when we process it. (R E Broadley)
  • Loading branch information
laanwj committed Sep 16, 2014
2 parents 2d782ab + 604ee2a commit f010344
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3791,15 +3791,16 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,

bool fMissingInputs = false;
CValidationState state;

mapAlreadyAskedFor.erase(inv);

if (AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs))
{
mempool.check(pcoinsTip);
RelayTransaction(tx);
mapAlreadyAskedFor.erase(inv);
vWorkQueue.push_back(inv.hash);
vEraseQueue.push_back(inv.hash);


LogPrint("mempool", "AcceptToMemoryPool: peer=%d %s : accepted %s (poolsz %u)\n",
pfrom->id, pfrom->cleanSubVer,
tx.GetHash().ToString(),
Expand Down Expand Up @@ -3833,7 +3834,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
{
LogPrint("mempool", " accepted orphan tx %s\n", orphanHash.ToString());
RelayTransaction(orphanTx);
mapAlreadyAskedFor.erase(CInv(MSG_TX, orphanHash));
vWorkQueue.push_back(orphanHash);
}
else if (!fMissingInputs2)
Expand Down

0 comments on commit f010344

Please sign in to comment.