diff options
author | Alex Morcos <morcos@chaincode.com> | 2017-04-03 11:31:27 -0400 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2017-05-10 11:47:45 -0400 |
commit | 3ee76d6de5c8f8705c4b9bbcc75da0df4d42c966 (patch) | |
tree | 73e4c35a931df13e5b8300e0fd983ebc26e00044 /src/rpc | |
parent | 5f1f0c64905491fea4ba50c0a8eb68fa59d65411 (diff) |
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.. )
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/mining.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 9f6cab861c..22bff1cf9e 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)); |