aboutsummaryrefslogtreecommitdiff
path: root/src/core.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2014-05-27 15:44:57 -0400
committerGavin Andresen <gavinandresen@gmail.com>2014-07-03 13:44:33 -0400
commitb33d1f5ee512da5719b793b3867f75f1eea5cf52 (patch)
tree7bb3a60c6ca9c66c10920068bf7d63c942e52570 /src/core.h
parent29264a0a60fb18671ab43713f168765ab7609cd6 (diff)
Use fee/priority estimates in wallet CreateTransaction
The wallet now uses the mempool fee estimator with a new command-line option: -txconfirmtarget (default: 1) instead of using hard-coded fees or priorities. A new bitcoind that hasn't seen enough transactions to estimate will fall back to the old hard-coded minimum priority or transaction fee. -paytxfee option overrides -txconfirmtarget. Relaying and mining code isn't changed. For Qt, the coin control dialog now uses priority estimates to label transaction priority (instead of hard-coded constants); unspent outputs were consistently labeled with a much higher priority than is justified by the free transactions actually being accepted into blocks. I did not implement any GUI for setting -txconfirmtarget; I would suggest getting rid of the "Pay transaction fee" GUI and replace it with either "target number of confirmations" or maybe a "faster confirmation <--> lower fee" slider or select box.
Diffstat (limited to 'src/core.h')
-rw-r--r--src/core.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core.h b/src/core.h
index 8606831575..d6e7ab870d 100644
--- a/src/core.h
+++ b/src/core.h
@@ -131,7 +131,8 @@ public:
friend bool operator<(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK < b.nSatoshisPerK; }
friend bool operator>(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK > b.nSatoshisPerK; }
friend bool operator==(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK == b.nSatoshisPerK; }
-
+ friend bool operator<=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK <= b.nSatoshisPerK; }
+ friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; }
std::string ToString() const;
IMPLEMENT_SERIALIZE( READWRITE(nSatoshisPerK); )