diff options
author | Fabian Jahr <fjahr@protonmail.com> | 2020-08-22 18:31:34 +0200 |
---|---|---|
committer | Fabian Jahr <fjahr@protonmail.com> | 2021-04-19 20:31:02 +0200 |
commit | ca01bb8d689f93e1c7669b0ba7a4994c0206dabd (patch) | |
tree | aab91a25f307130ff3173a9503c9a4fe3f765fa4 /src/rpc | |
parent | 57a026c30fef3138bb8db46e6865acb9dc2674f8 (diff) |
rpc: Add Coinstats index to getindexinfo
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/misc.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 00a06260ea..dd495850d3 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -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)); }); |