| 12 | } |
| 13 | |
| 14 | void CompactTxFinder::initMapping(uint64_t idk0, uint64_t idk1) { |
| 15 | |
| 16 | std::vector<uint256> hashes; |
| 17 | mempool.queryHashes(hashes); |
| 18 | |
| 19 | for (auto& t : hashes) { |
| 20 | uint64_t shortID = GetShortID(idk0, idk1, t); |
| 21 | |
| 22 | if (mappedMempool.count(shortID)) { |
| 23 | |
| 24 | LogPrint("thin", "ShortID hash collision in mempool"); |
| 25 | |
| 26 | // Erase, so the tx re-fetched from peer instead. |
| 27 | mappedMempool.erase(shortID); |
| 28 | continue; |
| 29 | } |
| 30 | mappedMempool[shortID] = t; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | CTransaction CompactTxFinder::operator()(const ThinTx& hash) const { |
| 35 |
nothing calls this directly
no test coverage detected