diff options
| author | Suhas Daftuar <[email protected]> | 2016-04-11 12:52:29 -0400 |
|---|---|---|
| committer | Suhas Daftuar <[email protected]> | 2016-04-11 15:58:01 -0400 |
| commit | 7e91f632c70ff1848a152f24ee67a06796803943 (patch) | |
| tree | 53995d33bf585645d43e51abbef2a7caf9754ef3 /src/main.cpp | |
| parent | Merge #7858: Add jl2012 public key for gitian build (diff) | |
| download | discoin-7e91f632c70ff1848a152f24ee67a06796803943.tar.xz discoin-7e91f632c70ff1848a152f24ee67a06796803943.zip | |
Use txid as key in mapAlreadyAskedFor
Previously we used the CInv that would be sent to the peer announcing the
transaction as the key, but using the txid instead allows us to decouple the
p2p layer from the application logic (which relies on this map to avoid
duplicate tx requests).
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index f5c7e11d6..5c1af9ecc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4956,7 +4956,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, CValidationState state; pfrom->setAskFor.erase(inv.hash); - mapAlreadyAskedFor.erase(inv); + mapAlreadyAskedFor.erase(inv.hash); CFeeRate txFeeRate = CFeeRate(0); if (!AlreadyHave(inv) && AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs, &txFeeRate)) { |