Fix ZMQ DaemonInfo:

* top_block_hash was never set in handler
  * wide_difficulty was never sent in JSON
  * wide_cumulative_difficulty was never sent in JSON
This commit is contained in:
Lee *!* Clagett 2024-06-24 19:57:20 -04:00
parent 24ccaba6ef
commit c5ad937cc1
4 changed files with 87 additions and 0 deletions

View file

@ -520,6 +520,8 @@ namespace rpc
res.info.target_height = res.info.height;
}
m_core.get_blockchain_top(res.info.top_block_height, res.info.top_block_hash);
auto& chain = m_core.get_blockchain_storage();
res.info.wide_difficulty = chain.get_difficulty_for_next_block();