0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-10 10:52:31 -05:00
bitcoin-bitcoin-core/src/wallet/rpc
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
..
addresses.cpp script/sign: remove needless IsSolvable() utility 2022-08-11 15:43:40 +02:00
backup.cpp Merge bitcoin/bitcoin#25768: wallet: Properly rebroadcast unconfirmed transaction chains 2022-09-05 13:54:36 +01:00
coins.cpp Merge bitcoin/bitcoin#25734: wallet, refactor: #24584 follow-ups 2022-08-16 20:00:19 -04:00
encrypt.cpp scripted-diff: Replace NullUniValue with UniValue::VNULL 2022-07-25 17:27:53 +02:00
signmessage.cpp scripted-diff: Replace NullUniValue with UniValue::VNULL 2022-07-25 17:27:53 +02:00
spend.cpp fixups for BIP125 doc cleanup 2022-08-22 14:59:58 +01:00
transactions.cpp fixups for BIP125 doc cleanup 2022-08-22 14:59:58 +01:00
util.cpp Merge bitcoin/bitcoin#24678: Prevent wallet unload on GetWalletForJSONRPCRequest 2022-08-17 14:39:50 +01:00
util.h rpc: output wallet descriptors for received entries in listsinceblock 2022-07-19 12:46:01 +02:00
wallet.cpp Add migratewallet RPC 2022-08-29 17:30:38 -04:00
wallet.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00