From 3ee76d6de5c8f8705c4b9bbcc75da0df4d42c966 Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Mon, 3 Apr 2017 11:31:27 -0400 Subject: Introduce a scale factor For the per confirmation number tracking of data, introduce a scale factor so that in the longer horizones confirmations are bucketed together at a resolution of the scale. (instead of 1008 individual data points for each fee bucket, have 42 data points each covering 24 different confirmation values.. (1-24), (25-48), etc.. ) --- src/rpc/mining.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/rpc/mining.cpp') diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 9f6cab861..22bff1cf9 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -895,6 +895,7 @@ UniValue estimaterawfee(const JSONRPCRequest& request) "{\n" " \"feerate\" : x.x, (numeric) estimate fee-per-kilobyte (in BTC)\n" " \"decay\" : x.x, (numeric) exponential decay (per block) for historical moving average of confirmation data\n" + " \"scale\" : x, (numeric) The resolution of confirmation targets at this time horizon\n" " \"pass.\" information about the lowest range of feerates to succeed in meeting the threshold\n" " \"fail.\" information about the highest range of feerates to fail to meet the threshold\n" " \"startrange\" : x.x, (numeric) start of feerate range\n" @@ -932,6 +933,7 @@ UniValue estimaterawfee(const JSONRPCRequest& request) result.push_back(Pair("feerate", feeRate == CFeeRate(0) ? -1.0 : ValueFromAmount(feeRate.GetFeePerK()))); result.push_back(Pair("decay", buckets.decay)); + result.push_back(Pair("scale", (int)buckets.scale)); result.push_back(Pair("pass.startrange", round(buckets.pass.start))); result.push_back(Pair("pass.endrange", round(buckets.pass.end))); result.push_back(Pair("pass.withintarget", round(buckets.pass.withinTarget * 100.0) / 100.0)); -- cgit v1.2.3