]> Git Repo - VerusCoin.git/commitdiff
Return minimum fee rate rather than -1 in estimatefee RPC API
authormiketout <[email protected]>
Tue, 23 Jun 2020 05:11:22 +0000 (22:11 -0700)
committermiketout <[email protected]>
Tue, 23 Jun 2020 05:11:22 +0000 (22:11 -0700)
src/rpc/mining.cpp

index 318663b4d79e8ba362fd00d10b9516e9a3066ff0..75df30ff32fb3493ef50ec784bfc72592a57db74 100644 (file)
@@ -1079,6 +1079,10 @@ UniValue estimatefee(const UniValue& params, bool fHelp)
         nBlocks = 1;
 
     CFeeRate feeRate = mempool.estimateFee(nBlocks);
+    if (feeRate == CFeeRate(0))
+    {
+        feeRate = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE);
+    }
     return ValueFromAmount(feeRate.GetFeePerK());
 }
 
This page took 0.027524 seconds and 4 git commands to generate.