[wallet] Refactor to use new MIN_CHANGE#6669
Conversation
12ff907 to
d266b80
Compare
|
I will add some more tests later. |
|
ping @dooglus: As you are one of the authors of the coin selection code and tests, would you mind giving a concept ACK or concept NACK on this pull? |
|
Looks good to me. It makes sense to have the minimum change not be hardcoded to 0.01. |
|
utACK |
src/wallet/wallet.h
Outdated
There was a problem hiding this comment.
If it's a constant, please use an all-upper-case name to make that clear, like MINIMUM_CHANGE.
If you plan to turn it into a runtime variable later, it's probably better to make it a runtime variable immediately now, and initialize it with a constant, for example DEFAULT_MINIMUM_CHANGE.
There was a problem hiding this comment.
No plans yet to turn it into a runtime variable.
baab750 to
c3c98ff
Compare
|
Addressed nit by @sipa in follow up commit c3c98ffcb6c27fb836754d54954d2f273928c164. |
c3c98ff to
bb3ed07
Compare
|
Add mention of the addition of DEFAULT_TRANSACTION_MINFEE to the commit message? |
|
Anything holding this back? Does this need more review or additional test cases? |
|
@MarcoFalke oh? it appeared that the commits in this PR added it. |
|
Concept & light code review ACK. |
* Introduce new constant MIN_CHANGE and use it instead of the hardcoded "CENT" * Add test case for MIN_CHANGE * Introduce new constant for -mintxfee default: DEFAULT_TRANSACTION_MINFEE = 1000
bb3ed07 to
5190276
Compare
5190276 to
a9c73a1
Compare
|
@wtogami Done. (Fixed commit msg) |
|
Concept ACK. After this we could completely get rid of CENT. |
There was a problem hiding this comment.
Should use this new default constant in init.cpp as well (e.g. HelpMessage)
|
utACK |
Bitcoin 0.12 cleanup PRs 2 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6631 - bitcoin/bitcoin#6664 - Only the first commit (we already had the second through bitcoin/bitcoin#6825). - bitcoin/bitcoin#6669 - bitcoin/bitcoin#6887 - Only the non-QT parts. - bitcoin/bitcoin#6962 - bitcoin/bitcoin#6822 - Only first and third commits (we already had the second through an earlier PR). - bitcoin/bitcoin#7136 - Excludes Travis CI changes, and fixes to documents we don't have anymore. - bitcoin/bitcoin#7084 - bitcoin/bitcoin#7509 - bitcoin/bitcoin#7617 - bitcoin/bitcoin#7726 Part of #2074.
Introduce a new constant
MIN_CHANGEand use it in appropriate places.