File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class CFeeRate
25
25
/* * Fee rate of 0 satoshis per kB */
26
26
CFeeRate () : nSatoshisPerK(0 ) { }
27
27
template <typename I>
28
- CFeeRate (const I _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) {
28
+ explicit CFeeRate (const I _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) {
29
29
// We've previously had bugs creep in from silent double->int conversion...
30
30
static_assert (std::is_integral<I>::value, " CFeeRate should be used without floats" );
31
31
}
Original file line number Diff line number Diff line change @@ -2327,7 +2327,7 @@ static UniValue settxfee(const JSONRPCRequest& request)
2327
2327
2328
2328
CAmount nAmount = AmountFromValue (request.params [0 ]);
2329
2329
CFeeRate tx_fee_rate (nAmount, 1000 );
2330
- if (tx_fee_rate == 0 ) {
2330
+ if (tx_fee_rate == CFeeRate ( 0 ) ) {
2331
2331
// automatic selection
2332
2332
} else if (tx_fee_rate < pwallet->chain ().relayMinFee ()) {
2333
2333
throw JSONRPCError (RPC_INVALID_PARAMETER, strprintf (" txfee cannot be less than min relay tx fee (%s)" , pwallet->chain ().relayMinFee ().ToString ()));
@@ -3386,7 +3386,7 @@ static UniValue bumpfee(const JSONRPCRequest& request)
3386
3386
}
3387
3387
} else if (options.exists (" fee_rate" )) {
3388
3388
CFeeRate fee_rate (AmountFromValue (options[" fee_rate" ]));
3389
- if (fee_rate <= 0 ) {
3389
+ if (fee_rate <= CFeeRate ( 0 ) ) {
3390
3390
throw JSONRPCError (RPC_INVALID_PARAMETER, strprintf (" Invalid fee_rate %s (must be greater than 0)" , fee_rate.ToString ()));
3391
3391
}
3392
3392
coin_control.m_feerate = fee_rate;
You can’t perform that action at this time.
0 commit comments