Output Fee Estimation Calculations in CreateTransaction

This commit is contained in:
Alex Morcos
2017-04-25 15:39:32 -04:00
parent 9c248e39f2
commit 1bebfc8d3a
7 changed files with 134 additions and 44 deletions

View File

@@ -870,10 +870,10 @@ UniValue estimatesmartfee(const JSONRPCRequest& request)
}
UniValue result(UniValue::VOBJ);
int answerFound;
CFeeRate feeRate = ::feeEstimator.estimateSmartFee(nBlocks, &answerFound, ::mempool, conservative);
FeeCalculation feeCalc;
CFeeRate feeRate = ::feeEstimator.estimateSmartFee(nBlocks, &feeCalc, ::mempool, conservative);
result.push_back(Pair("feerate", feeRate == CFeeRate(0) ? -1.0 : ValueFromAmount(feeRate.GetFeePerK())));
result.push_back(Pair("blocks", answerFound));
result.push_back(Pair("blocks", feeCalc.returnedTarget));
return result;
}