Commit graph

25 commits

Author SHA1 Message Date
Byron Hambly
7f25cff4a2 Merge 34ac3f438a into merged_master (Bitcoin PR bitcoin/bitcoin#26485) 2025-06-27 11:24:52 +02:00
Byron Hambly
0b1508bf01
ci: fix lint issues 2025-04-17 11:06:32 +02:00
Tom Trevethan
3857099fba Merge b55b11f92a into merged_master (Bitcoin PR bitcoin/bitcoin#25375) 2025-04-02 21:38:33 +02:00
Byron Hambly
fbfa372bbe Merge 0139a0d5c0 into merged_master (Bitcoin PR bitcoin/bitcoin#26722) 2025-03-31 12:19:59 +02:00
Tom Trevethan
0dcc75c6ae Merge ef744c03e5 into merged_master (Bitcoin PR bitcoin/bitcoin#25729) 2025-03-24 15:11:44 +00:00
Byron Hambly
0252ee8a86 Merge cac29f5cd6 into merged_master (Bitcoin PR bitcoin/bitcoin#26622) 2025-03-04 13:00:57 +02:00
Byron Hambly
0b0d5d214e Merge 8597260872 into merged_master (Bitcoin PR bitcoin/bitcoin#26480) 2025-03-04 10:42:21 +02:00
Byron Hambly
d8cd03906e
Merge 72a5e4117c into merged_master (Elements PR #1391)
Adds a FIXME in wallet_sendall.py
2025-02-11 15:46:34 +02:00
Byron Hambly
ca0a68b350
Merge UP TO 551c8e9526 into merged_master (UP TO bitcoin/bitcoin#26349)
Includes FIXMEs for a few functional tests
2025-02-05 09:50:17 +02:00
Byron Hambly
8499b13762
lint: fix lint issues 2024-12-03 14:02:33 +02:00
Byron Hambly
fc8637248f Merge a56876e6b9 into merged_master (Bitcoin PR bitcoin/bitcoin#26024) 2024-11-27 10:39:27 +02:00
Byron Hambly
eaf7efce1c Merge 718304d222 into merged_master (Bitcoin PR bitcoin/bitcoin#26084) 2024-11-26 20:17:51 +02:00
Byron Hambly
01c6b7b6a6 Merge d16ef40441 into merged_master (Bitcoin PR bitcoin/bitcoin#25955) 2024-11-25 14:36:23 +02:00
James Dorfman
22ccf93f29 Adapt sendall RPC to work properly in elements.
This fixes errors introduced in the merge of bitcoin/bitcoin#24118 in d5b8d28d07.

Pleaae review this commit carefully.
2024-06-21 20:19:03 +00:00
Ryan Ofsky
95d7de0964 test: Update python tests to use named parameters instead of options objects 2023-05-03 11:27:51 -05:00
ishaanam
cfe5aebc79 rpc: add minconf and maxconf options to sendall 2023-01-11 17:08:35 -05:00
kdmukai
31fdc54dba test: speed up wallet_fundrawtransaction.py and wallet_sendall.py 2022-12-19 11:12:40 -06:00
Aurèle Oulès
cb44c5923a
test: Add sendall test for min-fee setting 2022-12-02 13:30:40 +01:00
MacroFake
555519d082
test: Remove wallet option from non-wallet tests
Review note: The changes are complete, because self.options.descriptors
is set to None in parse_args (test_framework.py).

A value of None implies -disablewallet, see the previous commit.

So if a call to add_wallet_options is missing, it will lead to a test
failure when the wallet is compiled in.
2022-11-10 17:19:13 +01:00
Andrew Chow
315fd4dbab test: Test for out of bounds vout in sendall 2022-10-20 13:25:13 -04:00
Andrew Chow
708b72b715 test: Test that sendall works with watchonly spending specific utxos 2022-10-20 13:21:03 -04:00
kouloumos
cc434cbf58 wallet: fix sendall creates tx that fails tx-size check
The `sendall` RPC doesn't use `CreateTransactionInternal`as the rest of
the wallet RPCs and it never checks against the tx-size mempool limit.
Add a check for tx-size as well as test coverage for that case.
2022-09-15 13:22:19 +03:00
ishaanam
6f8e3818af sendall: check if the maxtxfee has been exceeded 2022-09-13 18:12:42 -04:00
ishaanam
bb84b7145b
add tests for no recipient and using send_max while inputs are specified 2022-03-29 16:37:49 -04:00
Murch
49090ec402
Add sendall RPC née sweep
_Motivation_
Currently, the wallet uses a fSubtractFeeAmount (SFFO) flag on the
recipients objects for all forms of sending calls. According to the
commit discussion, this flag was chiefly introduced to permit sweeping
without manually calculating the fees of transactions. However, the flag
leads to unintuitive behavior and makes it more complicated to test
many wallet RPCs exhaustively. We proposed to introduce a dedicated
`sendall` RPC with the intention to cover this functionality.

Since the proposal, it was discovered in further discussion that our
proposed `sendall` rpc and SFFO have subtly different scopes of
operation.
• sendall:
  Use _specific UTXOs_ to pay a destination the remainder after fees.
• SFFO:
  Use a _specific budget_ to pay an address the remainder after fees.

While `sendall` will simplify cases of spending from specific UTXOs,
emptying a wallet, or burning dust, we realized that there are some
cases in which SFFO is used to pay other parties from a limited budget,
which can often lead to the creation of change outputs. This cannot be
easily replicated using `sendall` as it would require manual computation
of the appropriate change amount.

As such, sendall cannot replace all uses of SFFO, but it still has a
different use case and will aid in simplifying some wallet calls and
numerous wallet tests.

_Sendall call details_
The proposed sendall call builds a transaction from a specific subset of
the wallet's UTXO pool (by default all of them) and assigns the funds to
one or more receivers. Receivers can either be specified with a specific
amount or receive an equal share of the remaining unassigned funds. At
least one recipient must be provided without assigned amount to collect
the remainder. The `sendall` call will never create change. The call has
a `send_max` option that changes the default behavior of spending all
UTXOs ("no UTXO left behind"), to maximizing the output amount of the
transaction by skipping uneconomic UTXOs. The `send_max` option is
incompatible with providing a specific set of inputs.
2022-03-29 16:37:47 -04:00