bitcoindevkit / bitcoindevkit/coin-select

Rename `Drain` to `Change`

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
18
Forks
14
PR merge metrics
No merged PRs in 30d

Description

When I originally named change outputs "drain" outputs I thought I was being clever because sometimes you use these kinds of outputs to drain value to things that are not technically change addresses. However the conversation over [here](https://github.com/bitcoindevkit/coin-select/issues/17#issuecomment-1899718113) led me to think about what you would do if you wanted to drain a bunch of funds to an output e.g. sweep a wallet or something and my conclusion was that you would actually not use the `Drain` system but rather:

1. Set an output whose value is above dust
2. Select all the things somehow
3. Set the value of the output to the excess

The main point being that "drain" system we have is really an optional output system to take excess otherwise known as *change output* or it is at least close enough it's unhelpful to name it something else.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.