-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #991: [RPC][Wallet] Create multiple transactions with one command.
a872b41 Create multiple transactions with one command. (Zannick) Pull request description: ## Details RPC send commands have a new argument `inputs_per_tx` that controls whether the amount specified can be split across multiple transactions. This value ranges from 0 (default) to 32 (an upper bound designed to prevent transactions larger than can be accepted). When set to 0, attempts to fit the send in one transaction as per previous behavior. The sends are interpreted to mean that the recipient will receive the sent amount, but under the hood the transactions are created as if `subtractfeefromamount` was specified. In particular, if the send needs to be split into `n > 1` transactions, the outputs of the first `n - 1` are randomly reduced to account for the fee (and the shortfall from the inputs). Coins are selected using a sliding window that prioritizes cleaning up small utxos (dust) over using fewer inputs, and thus transactions built this way will tend toward having more inputs. This is beneficial for ringct staking (keeping larger coins intact and reducing the amount of small utxos). The smallest utxo is always included if possible to prevent the amount of small utxos from increasing with usage. ## Tested On regtest some months ago. Tree-SHA512: 8b6b0b7fccdb16507da321c371b8075fdecae5f53ca2fb95a49a8d8edb6104c3c7d26270c0f029a99bf0aff4fe6a15c9e0b0fdfad372ab8166b619ce2ac38f98
- Loading branch information
Showing
7 changed files
with
427 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.