HomePhabricator

[net processing] [refactor] Move m_next_send_feefilter and m_fee_filter_sent

Description

[net processing] [refactor] Move m_next_send_feefilter and m_fee_filter_sent

Summary:
Move m_next_send_feefilter and m_fee_filter_sent out of the TxRelay
data structure. All of the other members of TxRelay are related to
sending transactions _to_ the peer, whereas m_fee_filter_sent and
m_next_send_feefilter are both related to receiving transactions _from_
the peer. A node's tx relay behaviour is not always symmetrical (eg a
blocksonly node will ignore incoming transactions, but may still send
out its own transactions), so it doesn't make sense to group the
feefilter sending data with the TxRelay data in a single structure.

This does not change behaviour, since IsBlockOnlyConn() is always equal
to !peer.m_tx_relay. We still don't send feefilter messages to outbound
block-relay-only peers (tested in p2p_feefilter.py).

This is a partial backport of core#22778
https://github.com/bitcoin/bitcoin/pull/22778/commits/42e3250497b03478d61cd6bfe6cd904de73d57b1

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D14738

Details

Provenance
PiRKAuthored on Nov 6 2023, 07:16
PiRKPushed on Nov 6 2023, 15:34
Reviewer
Restricted Project
Differential Revision
D14738: [net processing] [refactor] Move m_next_send_feefilter and m_fee_filter_sent
Parents
rABC6c7f9e00cae7: [avalanche] Move the invalid proofs filter to the peer manager
Branches
Unknown
Tags
Unknown