diff options
author | fanquake <fanquake@gmail.com> | 2022-12-02 14:51:24 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-12-02 15:13:31 +0000 |
commit | 78aee0fe2ca72e7bc0f36e7479574ebc1f6a9bee (patch) | |
tree | 0b8515ea603112433b05014ab2d09c6353ba4759 /test/functional/interface_bitcoin_cli.py | |
parent | 9e59d21fbe5746b220f35b0a5a735198c3e6dcdb (diff) | |
parent | 8f2dac54096c20afd8fd12c21a2ee5465fea085e (diff) |
Merge bitcoin/bitcoin#26569: p2p: Ensure transaction announcements are only queued for fully connected peers
8f2dac54096c20afd8fd12c21a2ee5465fea085e [test] Add p2p_tx_privacy.py (dergoegge)
ce63fca13e9b500e9f687d80a457175ac967a371 [net processing] Assume that TxRelay::m_tx_inventory_to_send is empty pre-verack (dergoegge)
845e3a34c49abcc634b5a10ccdd6b10fb4fcf449 [net processing] Ensure transaction announcements are only queued for fully connected peers (dergoegge)
Pull request description:
`TxRelay::m_next_inv_send_time` is initialized to 0, which means that any txids in `TxRelay::m_tx_inventory_to_send` will be announced on the first call to `PeerManagerImpl::SendMessages` for a fully connected peer (i.e. it completed the version handshake).
Prior to #21160, `TxRelay::m_tx_inventory_to_send` was guaranteed to be empty on the first `SendMessages` call, as transaction announcements were only queued for fully connected peers. #21160 replaced a `CConnman::ForEachNode` call with a loop over `PeerManagerImpl::m_peer_map`, in which the txid for a transaction to be relayed is added to `TxRelay::m_tx_inventory_to_send` for all peers. Even for those peers that have not completed the version handshake. Prior to the PR this was not the case as `ForEachNode` has a "fully connected check" before calling a function for each node.
ACKs for top commit:
MarcoFalke:
ACK 8f2dac54096c20afd8fd12c21a2ee5465fea085e 🔝
jnewbery:
utACK 8f2dac54096c20afd8fd12c21a2ee5465fea085e
Tree-SHA512: e9eaccf7e00633ee0806fff1068b0e413a69a5e389d96c9659f68079915a6381ad5040c61f716cfcde77931d1b563b1049da97a232a95c6cd8355bd3d13404b9
Diffstat (limited to 'test/functional/interface_bitcoin_cli.py')
0 files changed, 0 insertions, 0 deletions