From d51e3f21f778d6fc3ae6fed1d47503e0d41df522 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Tue, 21 Sep 2021 20:28:11 +0200 Subject: 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 --- src/serialization/json_object.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/serialization/json_object.h') diff --git a/src/serialization/json_object.h b/src/serialization/json_object.h index de14c8911..15459163b 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& dest, const cryptonote::rpc::output_distribution& dist); void fromJsonValue(const rapidjson::Value& val, cryptonote::rpc::output_distribution& dist); +void toJsonValue(rapidjson::Writer& dest, const cryptonote::tx_block_template_backlog_entry& entry); +void fromJsonValue(const rapidjson::Value& val, cryptonote::tx_block_template_backlog_entry& entry); + template typename std::enable_if::value, void>::type toJsonValue(rapidjson::Writer& dest, const Map& map); -- cgit v1.2.3