2018-11-20 05:28:23 +01:00
|
|
|
Coin selection
|
|
|
|
--------------
|
|
|
|
|
|
|
|
### Reuse Avoidance
|
|
|
|
|
|
|
|
A new wallet flag `avoid_reuse` has been added (default off). When enabled,
|
|
|
|
a wallet will distinguish between used and unused addresses, and default to not
|
|
|
|
use the former in coin selection.
|
|
|
|
|
2019-06-19 18:06:06 +02:00
|
|
|
Rescanning the blockchain is required, to correctly mark previously
|
|
|
|
used destinations.
|
2018-11-20 05:28:23 +01:00
|
|
|
|
|
|
|
Together with "avoid partial spends" (present as of Bitcoin v0.17), this
|
|
|
|
addresses a serious privacy issue where a malicious user can track spends by
|
|
|
|
peppering a previously paid to address with near-dust outputs, which would then
|
|
|
|
be inadvertently included in future payments.
|
|
|
|
|
|
|
|
New RPCs
|
|
|
|
--------
|
|
|
|
|
|
|
|
- A new `setwalletflag` RPC sets/unsets flags for an existing wallet.
|
|
|
|
|
|
|
|
|
|
|
|
Updated RPCs
|
|
|
|
------------
|
|
|
|
|
|
|
|
Several RPCs have been updated to include an "avoid_reuse" flag, used to control
|
|
|
|
whether already used addresses should be left out or included in the operation.
|
|
|
|
These include:
|
|
|
|
|
|
|
|
- createwallet
|
|
|
|
- getbalance
|
2019-06-19 18:06:06 +02:00
|
|
|
- getbalances
|
2018-11-20 05:28:23 +01:00
|
|
|
- sendtoaddress
|
|
|
|
|
2019-06-19 18:06:06 +02:00
|
|
|
In addition, `sendtoaddress` has been changed to avoid partial spends when `avoid_reuse`
|
|
|
|
is enabled (if not already enabled via the `-avoidpartialspends` command line flag),
|
|
|
|
as it would otherwise risk using up the "wrong" UTXO for an address reuse case.
|
2018-11-20 05:28:23 +01:00
|
|
|
|
|
|
|
The listunspent RPC has also been updated to now include a "reused" bool, for nodes
|
|
|
|
with "avoid_reuse" enabled.
|