This is an alternative to #13756, which includes destination filters.
A destination filter is one of mixed
(default for -avoidreuse=false
), clean
(default for -avoidreuse=true
), or dirty
.
mixed
will do coin select without caring about dirty/clean state of outputsclean
will ignore dirty outputs in coin selectdirty
will ignore clean outputs in coin select
Pros with this alternative is that it more precisely allows the user to deal with different cases, and gives them a safe(ish) approach to getting rid of dirty UTXO’s.
Cons is (1) increased complexity/learning curve for users, and (2) larger diff for reviewers.
I will close one or the other based on feedback.
A PR will be made based on https://github.com/kallewoof/bitcoin/tree/feature-avoidreuse-destfilter-rpc once/if this PR is merged.