MIN_CHANGE
and use it in appropriate places.
[wallet] Refactor to use new MIN_CHANGE #6669
pull MarcoFalke wants to merge 3 commits into bitcoin:master from MarcoFalke:MarcoFalke-2015-walletCleanup changing 5 files +105 −57-
MarcoFalke commented at 9:35 pm on September 13, 2015: memberIntroduce a new constant
-
MarcoFalke force-pushed on Sep 18, 2015
-
MarcoFalke force-pushed on Sep 18, 2015
-
MarcoFalke commented at 2:55 pm on September 18, 2015: memberI will add some more tests later.
-
MarcoFalke commented at 2:39 pm on September 20, 2015: memberping @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?
-
dooglus commented at 4:58 pm on September 20, 2015: contributorLooks good to me. It makes sense to have the minimum change not be hardcoded to 0.01.
-
laanwj added the label Wallet on Sep 23, 2015
-
btcdrak commented at 7:27 am on September 30, 2015: contributorutACK
-
in src/wallet/wallet.h: in 1027fae01d outdated
40@@ -41,8 +41,12 @@ extern bool fPayAtLeastCustomFee; 41 static const CAmount DEFAULT_TRANSACTION_FEE = 0; 42 //! -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB 43 static const CAmount nHighTransactionFeeWarning = 0.01 * COIN; 44+//! -mintxfee default 45+static const CAmount DEFAULT_TRANSACTION_MINFEE = 1000; 46 //! -maxtxfee default 47 static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN; 48+//! minimum change amount 49+static const CAmount nMinChange = CENT;
sipa commented at 11:59 am on September 30, 2015: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.
MarcoFalke commented at 11:54 am on October 9, 2015:No plans yet to turn it into a runtime variable.MarcoFalke force-pushed on Oct 9, 2015MarcoFalke commented at 11:54 am on October 9, 2015: memberAddressed nit by @sipa in follow up commit c3c98ffcb6c27fb836754d54954d2f273928c164.MarcoFalke force-pushed on Oct 24, 2015MarcoFalke renamed this:
[wallet] Refactor to use new nMinChange
[wallet] Refactor to use new MIN_CHANGE
on Oct 24, 2015wtogami commented at 2:11 am on October 27, 2015: contributorAdd mention of the addition of DEFAULT_TRANSACTION_MINFEE to the commit message?MarcoFalke commented at 6:54 am on October 27, 2015: memberMarcoFalke commented at 6:55 am on October 27, 2015: memberAnything holding this back? Does this need more review or additional test cases?wtogami commented at 9:30 pm on October 27, 2015: contributor@MarcoFalke oh? it appeared that the commits in this PR added it.sipa commented at 1:39 am on October 28, 2015: memberConcept & light code review ACK.[wallet] Refactor to use new MIN_CHANGE
* 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
MarcoFalke force-pushed on Oct 28, 2015[wallet] Add comments for doxygen a9c73a130eMarcoFalke force-pushed on Oct 28, 2015MarcoFalke commented at 10:51 am on October 28, 2015: member@wtogami Done. (Fixed commit msg)laanwj commented at 12:37 pm on October 29, 2015: memberConcept ACK. After this we could completely get rid of CENT.in src/wallet/wallet.h: in a9c73a130e outdated
40@@ -41,8 +41,12 @@ extern bool fPayAtLeastCustomFee; 41 static const CAmount DEFAULT_TRANSACTION_FEE = 0; 42 //! -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB 43 static const CAmount nHighTransactionFeeWarning = 0.01 * COIN; 44+//! -mintxfee default 45+static const CAmount DEFAULT_TRANSACTION_MINFEE = 1000;
laanwj commented at 12:39 pm on October 29, 2015:Should use this new default constant in init.cpp as well (e.g. HelpMessage)
MarcoFalke commented at 4:40 pm on October 29, 2015:@laanwj Donedcousens commented at 1:00 pm on October 29, 2015: contributorutACKInit: Use DEFAULT_TRANSACTION_MINFEE in help message 6342a4889blaanwj merged this on Nov 4, 2015laanwj closed this on Nov 4, 2015
laanwj referenced this in commit 8a95a18562 on Nov 4, 2015MarcoFalke deleted the branch on Nov 4, 2015zkbot referenced this in commit 8713d73daf on Dec 18, 2019zkbot referenced this in commit 2da77edbfe on Dec 18, 2019zkbot referenced this in commit 577f7ef72a on Dec 18, 2019DrahtBot locked this on Sep 8, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 12:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 12:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me