bitcoin/test/functional/test_framework
glozow 5291933fed
Merge bitcoin/bitcoin#25768: wallet: Properly rebroadcast unconfirmed transaction chains
3405f3eed5 test: Test that an unconfirmed not-in-mempool chain is rebroadcast (Andrew Chow)
10d91c5abe wallet: Deduplicate Resend and ReacceptWalletTransactions (Andrew Chow)

Pull request description:

  Currently `ResendWalletTransactions` (used for normal rebroadcasts) will attempt to rebroadcast all of the transactions in the wallet in the order they are stored in `mapWallet`. This ends up being random as `mapWallet` is a `std::unordered_map`. However `ReacceptWalletTransactions` (used for adding to the mempool on loading) first sorts the txs by wallet insertion order, then submits them. The result is that `ResendWalletTranactions` will fail to rebroadcast child transactions if their txids happen to be lexicographically less than their parent's txid. This PR resolves this issue by combining `ReacceptWalletTransactions` and `ResendWalletTransactions` into a new `ResubmitWalletTransactions` so that the iteration code and basic checks are shared.

  A test has also been added that checks that such transaction chains are rebroadcast correctly.

ACKs for top commit:
  naumenkogs:
    utACK 3405f3eed5
  1440000bytes:
    reACK 3405f3eed5
  furszy:
    Late code review ACK 3405f3ee
  stickies-v:
    ACK 3405f3eed5

Tree-SHA512: 1240d9690ecc2ae8d476286b79e2386f537a90c41dd2b8b8a5a9c2a917aa3af85d6aee019fbbb05e772985a2b197e2788305586d9d5dac78ccba1ee5aa31d77a
2022-09-05 13:54:36 +01:00
..
__init__.py Rename rpc-tests directory to functional 2017-03-20 10:40:31 -04:00
address.py test: add helpers for creating P2TR scripts/addresses from output key 2022-06-14 13:32:57 +02:00
authproxy.py test: Remove Windows workaround in authproxy 2021-09-25 09:33:16 +02:00
bdb.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00
bip340_test_vectors.csv tests: add BIP340 Schnorr signature support to test framework 2020-10-12 17:18:47 -07:00
blocktools.py remove unused functions 2022-06-24 18:04:48 +05:30
coverage.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00
descriptors.py Output a descriptor in createmultisig and addmultisigaddress 2020-01-30 23:55:36 -05:00
key.py test: Test signing psbts without explicitly having scripts 2022-06-27 16:48:04 -04:00
messages.py test: Test that an unconfirmed not-in-mempool chain is rebroadcast 2022-08-29 12:41:50 -04:00
muhash.py test: Change MuHash Python implementation to match cpp version again 2020-12-22 01:48:34 +01:00
netutil.py test: remove import socket in test_ipv6_local 2022-02-14 19:27:33 -03:00
p2p.py test: p2p: add missing BIP157 message types to MESSAGEMAP 2022-05-13 13:37:46 +02:00
psbt.py test: support passing PSBTMaps directly to PSBT ctor 2022-07-23 08:48:08 +02:00
ripemd160.py Add pure Python RIPEMD-160 2021-12-08 14:29:34 -05:00
script.py Simplify wallet_taproot.py functional test 2022-01-12 11:09:41 -05:00
script_util.py test: add helpers for creating P2TR scripts/addresses from output key 2022-06-14 13:32:57 +02:00
segwit_addr.py Use Bech32m encoding for v1+ segwit addresses 2021-03-16 10:48:36 -07:00
siphash.py Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
socks5.py scripted-diff: Update copyright in ./test 2019-03-02 10:58:35 -05:00
test_framework.py test: Fail if connect_nodes fails 2022-06-22 09:15:33 +02:00
test_node.py Create BCLog::Level::Trace log severity level 2022-08-20 11:55:17 +02:00
test_shell.py TestShell: Return self from setup() 2019-11-05 12:55:52 +01:00
util.py test: add support for Decimal to assert_approx 2022-08-02 10:11:12 +09:00
wallet.py test: Target exact weight in MiniWallet _bulk_tx 2022-08-03 12:02:20 +02:00
wallet_util.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00