rpc: Add Coinstats index to getindexinfo

pull/826/head
Fabian Jahr 4 years ago
parent 57a026c30f
commit ca01bb8d68
No known key found for this signature in database
GPG Key ID: F13D1E9D890798CD

@ -5,6 +5,7 @@
#include <httpserver.h>
#include <index/blockfilterindex.h>
#include <index/coinstatsindex.h>
#include <index/txindex.h>
#include <interfaces/chain.h>
#include <key_io.h>
@ -689,6 +690,10 @@ static RPCHelpMan getindexinfo()
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) {
result.pushKVs(SummaryToJSON(index.GetSummary(), index_name));
});

Loading…
Cancel
Save