Skip to content

backport: Merge bitcoin/bitcoin#26733, 28996#7150

Draft
vijaydasmp wants to merge 2 commits intodashpay:developfrom
vijaydasmp:Feb_2026_02_1
Draft

backport: Merge bitcoin/bitcoin#26733, 28996#7150
vijaydasmp wants to merge 2 commits intodashpay:developfrom
vijaydasmp:Feb_2026_02_1

Conversation

@vijaydasmp
Copy link

Bitcoin Backporting

…connect if limit is reached, improve existing test coverage

b58f009 test: check that mempool msgs lead to disconnect if uploadtarget is reached (Sebastian Falbesoner)
dd5cf38 test: check for specific disconnect reasons in feature_maxuploadtarget.py (Sebastian Falbesoner)
73d7372 test: verify `-maxuploadtarget` limit state via `getnettotals` RPC result (Sebastian Falbesoner)

Pull request description:

  This PR improves existing and adds new test coverage for the `-maxuploadtarget` mechanism (feature_maxuploadtarget.py) in the following ways, one commit each:
  * verify the uploadtarget state via the `getnettotals` RPC (`uploadtarget` result field):
  https://github.com/bitcoin/bitcoin/blob/160d23677ad799cf9b493eaa923b2ac080c3fb8e/src/rpc/net.cpp#L581-L582
  Note that reaching the total limit (`target_reached` == True) always implies that the historical blocks serving limits is also reached (`serve_historical_blocks` == False), i.e. it's impossible that both flags are set to True.

  * check for peer's specific disconnect reason (in this case, `"historical block serving limit reached, disconnect peer"`):
  https://github.com/bitcoin/bitcoin/blob/160d23677ad799cf9b493eaa923b2ac080c3fb8e/src/net_processing.cpp#L2272-L2280

  * add a test for a peer disconnect if the uploadtarget is reached and a `mempool` message is received (if bloom filters are enabled):
  https://github.com/bitcoin/bitcoin/blob/160d23677ad799cf9b493eaa923b2ac080c3fb8e/src/net_processing.cpp#L4755-L4763
  Note that another reason for disconnect after receiving a MEMPOOL msg of a peer is if bloom filters are disabled on the node. This case is already covered in the functional test `p2p_nobloomfilter_messages.py`.

ACKs for top commit:
  maflcko:
    lgtm ACK b58f009
  achow101:
    ACK b58f009
  sr-gi:
    tACK [b58f009](bitcoin@b58f009)

Tree-SHA512: 7439134129695c9c3a7ddc5e39f2ed700f91e7c91f0b7a9e0a783f275c6aa2f9918529cbfd38bb37f9139184e05e0f0354ef3c3df56da310177ec1d6b48b43d0
…tractfeefrom` parameter

057057a Add test for `sendmany` rpc that uses `subtractfeefrom` parameter (Yusuf Sahin HAMZA)

Pull request description:

  This PR adds test that uses `sendmany` rpc to send **BTC** to multiple addresses using `subtractfeefrom` parameter, then checks receiver addresses balances to make sure fees are subtracted correctly.

ACKs for top commit:
  achow101:
    ACK 057057a

Tree-SHA512: 51167120d489f0ff7b8b9855424d07cb55a8965984f904643cddf45e7a08c350eaded498c350ec9c660edf72c2f128ec142347c9c79d5043d9f6cd481b15cd7e
@github-actions
Copy link

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants