diff options
| author | Lee *!* Clagett <code@leeclagett.com> | 2024-06-24 19:57:20 -0400 |
|---|---|---|
| committer | Lee *!* Clagett <code@leeclagett.com> | 2024-06-24 20:06:33 -0400 |
| commit | c5ad937cc11d3181b7549db573ac37ec635be96e (patch) | |
| tree | 7990e5461bacf0e08feea5411addcc85990b39f0 /src/rpc | |
| parent | 24ccaba6ef429fdd37a3281c586e655987201a5c (diff) | |
| download | monzero-core-c5ad937cc11d3181b7549db573ac37ec635be96e.tar.gz monzero-core-c5ad937cc11d3181b7549db573ac37ec635be96e.tar.xz monzero-core-c5ad937cc11d3181b7549db573ac37ec635be96e.zip | |
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
Diffstat (limited to 'src/rpc')
| -rw-r--r-- | src/rpc/daemon_handler.cpp | 2 | ||||
| -rw-r--r-- | src/rpc/message_data_structs.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp index 11ab80666..b13663ac9 100644 --- a/src/rpc/daemon_handler.cpp +++ b/src/rpc/daemon_handler.cpp @@ -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(); diff --git a/src/rpc/message_data_structs.h b/src/rpc/message_data_structs.h index dd9d198ed..7f3b787b6 100644 --- a/src/rpc/message_data_structs.h +++ b/src/rpc/message_data_structs.h @@ -176,6 +176,7 @@ namespace rpc { uint64_t height; uint64_t target_height; + uint64_t top_block_height; cryptonote::difficulty_type wide_difficulty; uint64_t difficulty; uint64_t target; |
