diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-09-16 11:29:32 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-09-16 11:31:54 +0200 |
commit | f0103441564b828e4d16142490a2f4bbef62da9a (patch) | |
tree | 06d480381d5424efb757e36f442fb66e14652b7b /src | |
parent | 2d782ab2ce30bf106e34cd3288c9082ac04022f9 (diff) | |
parent | 604ee2aa7d110439b4e59ecaa272b85ec41ab6a0 (diff) |
Merge pull request #4460
604ee2a Remove tx from AlreadyAskedFor list once we receive it, not when we process it. (R E Broadley)
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 90f4e48af0..3c19407b95 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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(), @@ -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) |