diff options
author | Alex Morcos <morcos@chaincode.com> | 2017-03-09 15:26:05 -0500 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2017-05-10 11:45:27 -0400 |
commit | c7447ec30348b338e77bc6429fbfac9f93549ef6 (patch) | |
tree | d29e992933923be972226b92b687cd081183e504 /src/rpc/mining.cpp | |
parent | 4186d3fdfd319b568b520dd587be27bdff45c53d (diff) |
Track failures in fee estimation.
Start tracking transactions which fail to confirm within the target and are then evicted or otherwise leave mempool.
Fix slight error in unit test.
Diffstat (limited to 'src/rpc/mining.cpp')
-rw-r--r-- | src/rpc/mining.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 6851f21004..74e5ba5f44 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -893,6 +893,7 @@ UniValue estimaterawfee(const JSONRPCRequest& request) " \"withintarget\" : x.x, (numeric) number of txs over history horizon in the feerate range that were confirmed within target\n" " \"totalconfirmed\" : x.x, (numeric) number of txs over history horizon in the feerate range that were confirmed at any point\n" " \"inmempool\" : x.x, (numeric) current number of txs in mempool in the feerate range unconfirmed for at least target blocks\n" + " \"leftmempool\" : x.x, (numeric) number of txs over history horizon in the feerate range that left mempool unconfirmed after target\n" "}\n" "\n" "A negative feerate is returned if no answer can be given.\n" @@ -927,11 +928,13 @@ UniValue estimaterawfee(const JSONRPCRequest& request) result.push_back(Pair("pass.withintarget", round(buckets.pass.withinTarget * 100.0) / 100.0)); result.push_back(Pair("pass.totalconfirmed", round(buckets.pass.totalConfirmed * 100.0) / 100.0)); result.push_back(Pair("pass.inmempool", round(buckets.pass.inMempool * 100.0) / 100.0)); + result.push_back(Pair("pass.leftmempool", round(buckets.pass.leftMempool * 100.0) / 100.0)); result.push_back(Pair("fail.startrange", round(buckets.fail.start))); result.push_back(Pair("fail.endrange", round(buckets.fail.end))); result.push_back(Pair("fail.withintarget", round(buckets.fail.withinTarget * 100.0) / 100.0)); result.push_back(Pair("fail.totalconfirmed", round(buckets.fail.totalConfirmed * 100.0) / 100.0)); result.push_back(Pair("fail.inmempool", round(buckets.fail.inMempool * 100.0) / 100.0)); + result.push_back(Pair("fail.leftmempool", round(buckets.fail.leftMempool * 100.0) / 100.0)); return result; } |