aboutsummaryrefslogtreecommitdiff
path: root/src/serialization/json_object.h
diff options
context:
space:
mode:
authorSChernykh <sergey.v.chernykh@gmail.com>2021-08-26 10:20:20 +0200
committerSChernykh <sergey.v.chernykh@gmail.com>2021-09-11 15:15:07 +0200
commitdfee15eee18a97be5a8fb9822527f98ebd1b33e9 (patch)
tree9106c7164c9fab9b2453175c89a9288d5ee201bb /src/serialization/json_object.h
parentMerge pull request #7881 (diff)
downloadmonero-dfee15eee18a97be5a8fb9822527f98ebd1b33e9.tar.xz
RPC and ZeroMQ APIs to support p2pool
Adds the following: - "get_miner_data" to RPC API - "json-miner-data" to ZeroMQ subscriber contexts Both provide the necessary data to create a custom block template. They are used by p2pool. Data provided: - major fork version - current height - previous block id - RandomX seed hash - network difficulty - median block weight - coins mined by the network so far - mineable mempool transactions
Diffstat (limited to 'src/serialization/json_object.h')
-rw-r--r--src/serialization/json_object.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/serialization/json_object.h b/src/serialization/json_object.h
index 35ea990b3..c858faf5a 100644
--- a/src/serialization/json_object.h
+++ b/src/serialization/json_object.h
@@ -304,6 +304,9 @@ void fromJsonValue(const rapidjson::Value& val, cryptonote::rpc::DaemonInfo& inf
void toJsonValue(rapidjson::Writer<epee::byte_stream>& dest, const cryptonote::rpc::output_distribution& dist);
void fromJsonValue(const rapidjson::Value& val, cryptonote::rpc::output_distribution& dist);
+void toJsonValue(rapidjson::Writer<epee::byte_stream>& dest, const cryptonote::tx_block_template_backlog_entry& entry);
+void fromJsonValue(const rapidjson::Value& val, cryptonote::tx_block_template_backlog_entry& entry);
+
template <typename Map>
typename std::enable_if<sfinae::is_map_like<Map>::value, void>::type toJsonValue(rapidjson::Writer<epee::byte_stream>& dest, const Map& map);