@@ -896,14 +896,15 @@ UniValue estimaterawfee(const JSONRPCRequest& request)
896
896
" \" feerate\" : x.x, (numeric) estimate fee-per-kilobyte (in BTC)\n "
897
897
" \" decay\" : x.x, (numeric) exponential decay (per block) for historical moving average of confirmation data\n "
898
898
" \" scale\" : x, (numeric) The resolution of confirmation targets at this time horizon\n "
899
- " \" pass.\" information about the lowest range of feerates to succeed in meeting the threshold\n "
900
- " \" fail.\" information about the highest range of feerates to fail to meet the threshold\n "
901
- " \" startrange\" : x.x, (numeric) start of feerate range\n "
902
- " \" endrange\" : x.x, (numeric) end of feerate range\n "
903
- " \" withintarget\" : x.x, (numeric) number of txs over history horizon in the feerate range that were confirmed within target\n "
904
- " \" totalconfirmed\" : x.x, (numeric) number of txs over history horizon in the feerate range that were confirmed at any point\n "
905
- " \" inmempool\" : x.x, (numeric) current number of txs in mempool in the feerate range unconfirmed for at least target blocks\n "
906
- " \" leftmempool\" : x.x, (numeric) number of txs over history horizon in the feerate range that left mempool unconfirmed after target\n "
899
+ " \" pass\" : { (json object) information about the lowest range of feerates to succeed in meeting the threshold\n "
900
+ " \" startrange\" : x.x, (numeric) start of feerate range\n "
901
+ " \" endrange\" : x.x, (numeric) end of feerate range\n "
902
+ " \" withintarget\" : x.x, (numeric) number of txs over history horizon in the feerate range that were confirmed within target\n "
903
+ " \" totalconfirmed\" : x.x, (numeric) number of txs over history horizon in the feerate range that were confirmed at any point\n "
904
+ " \" inmempool\" : x.x, (numeric) current number of txs in mempool in the feerate range unconfirmed for at least target blocks\n "
905
+ " \" leftmempool\" : x.x, (numeric) number of txs over history horizon in the feerate range that left mempool unconfirmed after target\n "
906
+ " }\n "
907
+ " \" fail\" : { ... } (json object) information about the highest range of feerates to fail to meet the threshold\n "
907
908
" }\n "
908
909
" \n "
909
910
" A negative feerate is returned if no answer can be given.\n "
@@ -934,18 +935,22 @@ UniValue estimaterawfee(const JSONRPCRequest& request)
934
935
result.push_back (Pair (" feerate" , feeRate == CFeeRate (0 ) ? -1.0 : ValueFromAmount (feeRate.GetFeePerK ())));
935
936
result.push_back (Pair (" decay" , buckets.decay ));
936
937
result.push_back (Pair (" scale" , (int )buckets.scale ));
937
- result.push_back (Pair (" pass.startrange" , round (buckets.pass .start )));
938
- result.push_back (Pair (" pass.endrange" , round (buckets.pass .end )));
939
- result.push_back (Pair (" pass.withintarget" , round (buckets.pass .withinTarget * 100.0 ) / 100.0 ));
940
- result.push_back (Pair (" pass.totalconfirmed" , round (buckets.pass .totalConfirmed * 100.0 ) / 100.0 ));
941
- result.push_back (Pair (" pass.inmempool" , round (buckets.pass .inMempool * 100.0 ) / 100.0 ));
942
- result.push_back (Pair (" pass.leftmempool" , round (buckets.pass .leftMempool * 100.0 ) / 100.0 ));
943
- result.push_back (Pair (" fail.startrange" , round (buckets.fail .start )));
944
- result.push_back (Pair (" fail.endrange" , round (buckets.fail .end )));
945
- result.push_back (Pair (" fail.withintarget" , round (buckets.fail .withinTarget * 100.0 ) / 100.0 ));
946
- result.push_back (Pair (" fail.totalconfirmed" , round (buckets.fail .totalConfirmed * 100.0 ) / 100.0 ));
947
- result.push_back (Pair (" fail.inmempool" , round (buckets.fail .inMempool * 100.0 ) / 100.0 ));
948
- result.push_back (Pair (" fail.leftmempool" , round (buckets.fail .leftMempool * 100.0 ) / 100.0 ));
938
+ UniValue passbucket (UniValue::VOBJ);
939
+ passbucket.push_back (Pair (" startrange" , round (buckets.pass .start )));
940
+ passbucket.push_back (Pair (" endrange" , round (buckets.pass .end )));
941
+ passbucket.push_back (Pair (" withintarget" , round (buckets.pass .withinTarget * 100.0 ) / 100.0 ));
942
+ passbucket.push_back (Pair (" totalconfirmed" , round (buckets.pass .totalConfirmed * 100.0 ) / 100.0 ));
943
+ passbucket.push_back (Pair (" inmempool" , round (buckets.pass .inMempool * 100.0 ) / 100.0 ));
944
+ passbucket.push_back (Pair (" leftmempool" , round (buckets.pass .leftMempool * 100.0 ) / 100.0 ));
945
+ result.push_back (Pair (" pass" , passbucket));
946
+ UniValue failbucket (UniValue::VOBJ);
947
+ failbucket.push_back (Pair (" startrange" , round (buckets.fail .start )));
948
+ failbucket.push_back (Pair (" endrange" , round (buckets.fail .end )));
949
+ failbucket.push_back (Pair (" withintarget" , round (buckets.fail .withinTarget * 100.0 ) / 100.0 ));
950
+ failbucket.push_back (Pair (" totalconfirmed" , round (buckets.fail .totalConfirmed * 100.0 ) / 100.0 ));
951
+ failbucket.push_back (Pair (" inmempool" , round (buckets.fail .inMempool * 100.0 ) / 100.0 ));
952
+ failbucket.push_back (Pair (" leftmempool" , round (buckets.fail .leftMempool * 100.0 ) / 100.0 ));
953
+ result.push_back (Pair (" fail" , failbucket));
949
954
return result;
950
955
}
951
956
0 commit comments