mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-28 21:00:41 +02:00
rpc: Add Coinstats index to getindexinfo
This commit is contained in:
parent
57a026c30f
commit
ca01bb8d68
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <httpserver.h>
|
#include <httpserver.h>
|
||||||
#include <index/blockfilterindex.h>
|
#include <index/blockfilterindex.h>
|
||||||
|
#include <index/coinstatsindex.h>
|
||||||
#include <index/txindex.h>
|
#include <index/txindex.h>
|
||||||
#include <interfaces/chain.h>
|
#include <interfaces/chain.h>
|
||||||
#include <key_io.h>
|
#include <key_io.h>
|
||||||
@ -689,6 +690,10 @@ static RPCHelpMan getindexinfo()
|
|||||||
result.pushKVs(SummaryToJSON(g_txindex->GetSummary(), index_name));
|
result.pushKVs(SummaryToJSON(g_txindex->GetSummary(), index_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_coin_stats_index) {
|
||||||
|
result.pushKVs(SummaryToJSON(g_coin_stats_index->GetSummary(), index_name));
|
||||||
|
}
|
||||||
|
|
||||||
ForEachBlockFilterIndex([&result, &index_name](const BlockFilterIndex& index) {
|
ForEachBlockFilterIndex([&result, &index_name](const BlockFilterIndex& index) {
|
||||||
result.pushKVs(SummaryToJSON(index.GetSummary(), index_name));
|
result.pushKVs(SummaryToJSON(index.GetSummary(), index_name));
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user