mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 8f5da89625 into merged_master (Bitcoin PR bitcoin/bitcoin#27559)
This commit is contained in:
commit
5a1eabf055
1 changed files with 4 additions and 1 deletions
|
|
@ -292,7 +292,8 @@ struct Peer {
|
|||
* this does not have to be sorted. */
|
||||
std::set<uint256> m_tx_inventory_to_send GUARDED_BY(m_tx_inventory_mutex);
|
||||
/** Whether the peer has requested us to send our complete mempool. Only
|
||||
* permitted if the peer has NetPermissionFlags::Mempool. See BIP35. */
|
||||
* permitted if the peer has NetPermissionFlags::Mempool or we advertise
|
||||
* NODE_BLOOM. See BIP35. */
|
||||
bool m_send_mempool GUARDED_BY(m_tx_inventory_mutex){false};
|
||||
/** The last time a BIP35 `mempool` request was serviced. */
|
||||
std::atomic<std::chrono::seconds> m_last_mempool_req{0s};
|
||||
|
|
@ -4666,6 +4667,8 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
|||
}
|
||||
|
||||
if (msg_type == NetMsgType::MEMPOOL) {
|
||||
// Only process received mempool messages if we advertise NODE_BLOOM
|
||||
// or if the peer has mempool permissions.
|
||||
if (!(peer->m_our_services & NODE_BLOOM) && !pfrom.HasPermission(NetPermissionFlags::Mempool))
|
||||
{
|
||||
if (!pfrom.HasPermission(NetPermissionFlags::NoBan))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue