mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-20 14:05:23 +01:00
rpc: Add Coinstats index to getindexinfo
This commit is contained in:
parent
57a026c30f
commit
ca01bb8d68
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue