diff options
author | Fabian Jahr <fjahr@protonmail.com> | 2020-07-31 14:01:31 +0200 |
---|---|---|
committer | Fabian Jahr <fjahr@protonmail.com> | 2020-08-16 11:15:49 +0200 |
commit | 667bc7a7f7c5d9a15eaf6957c3d8841a75efa7bc (patch) | |
tree | 4442244be84cec6d061efd0a12dc4f33d605147e /src/index/base.cpp | |
parent | a57af897ec16976b28de05aa0b9c3f6a96d73ede (diff) | |
download | bitcoin-667bc7a7f7c5d9a15eaf6957c3d8841a75efa7bc.tar.xz |
rpc: Add getindexinfo RPC
Diffstat (limited to 'src/index/base.cpp')
-rw-r--r-- | src/index/base.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/index/base.cpp b/src/index/base.cpp index f587205a28..e67b813763 100644 --- a/src/index/base.cpp +++ b/src/index/base.cpp @@ -319,3 +319,12 @@ void BaseIndex::Stop() m_thread_sync.join(); } } + +IndexSummary BaseIndex::GetSummary() const +{ + IndexSummary summary{}; + summary.name = GetName(); + summary.synced = m_synced; + summary.best_block_height = m_best_block_index.load()->nHeight; + return summary; +} |