aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-07-30 11:01:11 +0100
committerJon Atack <jon@atack.com>2020-08-26 11:57:07 +0200
commit430e183b89d00b4148f0b77a6fcacca2cd948202 (patch)
treeeb3efc3d6017d791bc7d55e24ff71747b4b6c6c6 /src/net_processing.cpp
parent42ca5618cae0fd9ef97d2006b17d896bc58cc17c (diff)
[net processing] Remove mempool argument from AlreadyHaveBlock()
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 3a0613deeb..3fb8907b5e 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1451,7 +1451,7 @@ bool static AlreadyHaveTx(const CInv& inv, const CTxMemPool& mempool) EXCLUSIVE_
return recentRejects->contains(inv.hash) || mempool.exists(ToGenTxid(inv));
}
-bool static AlreadyHaveBlock(const CInv& inv, const CTxMemPool& mempool) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
+bool static AlreadyHaveBlock(const CInv& inv) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
{
return LookupBlockIndex(inv.hash) != nullptr;
}
@@ -2662,7 +2662,7 @@ void PeerLogicValidation::ProcessMessage(CNode& pfrom, const std::string& msg_ty
}
if (inv.type == MSG_BLOCK) {
- bool fAlreadyHave = AlreadyHaveBlock(inv, m_mempool);
+ bool fAlreadyHave = AlreadyHaveBlock(inv);
LogPrint(BCLog::NET, "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom.GetId());
UpdateBlockAvailability(pfrom.GetId(), inv.hash);