aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorFabian Jahr <fjahr@protonmail.com>2020-08-22 18:31:34 +0200
committerFabian Jahr <fjahr@protonmail.com>2021-04-19 20:31:02 +0200
commitca01bb8d689f93e1c7669b0ba7a4994c0206dabd (patch)
treeaab91a25f307130ff3173a9503c9a4fe3f765fa4 /src/rpc
parent57a026c30fef3138bb8db46e6865acb9dc2674f8 (diff)
rpc: Add Coinstats index to getindexinfo
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/misc.cpp5
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));
});