aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2021-10-20 16:41:45 +0100
committerglozow <gloriajzhao@gmail.com>2021-10-21 16:26:59 +0100
commit4307849256761fe2440d82bbec892d0e8e6b4dd4 (patch)
tree7d32e7727d87b15b4b45a98a446b357a5072570d /src/net_processing.cpp
parentd50fbd4c5b4bc72415854d582cedf94541a46983 (diff)
downloadbitcoin-4307849256761fe2440d82bbec892d0e8e6b4dd4.tar.xz
[mempool] delete exists(uint256) function
Allowing callers to pass in a uint256 (which could be txid or wtxid) but then always assuming that it's a txid is a footgunny interface.
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 66b99aa2bb..bb731c14a4 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -3247,7 +3247,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
// Always relay transactions received from peers with forcerelay
// permission, even if they were already in the mempool, allowing
// the node to function as a gateway for nodes hidden behind it.
- if (!m_mempool.exists(tx.GetHash())) {
+ if (!m_mempool.exists(GenTxid::Txid(tx.GetHash()))) {
LogPrintf("Not relaying non-mempool transaction %s from forcerelay peer=%d\n", tx.GetHash().ToString(), pfrom.GetId());
} else {
LogPrintf("Force relaying tx %s from peer=%d\n", tx.GetHash().ToString(), pfrom.GetId());