aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/daemon.cpp
diff options
context:
space:
mode:
authorSChernykh <sergey.v.chernykh@gmail.com>2021-09-21 20:28:11 +0200
committerSChernykh <sergey.v.chernykh@gmail.com>2021-09-21 20:28:11 +0200
commitd51e3f21f778d6fc3ae6fed1d47503e0d41df522 (patch)
treeebc97f56e2818ae6f0313fbbc3bc1fdb5294552b /src/daemon/daemon.cpp
parentMerge pull request #7906 (diff)
downloadmonero-d51e3f21f778d6fc3ae6fed1d47503e0d41df522.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/daemon/daemon.cpp')
-rw-r--r--src/daemon/daemon.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp
index 99430b2b0..3f1885423 100644
--- a/src/daemon/daemon.cpp
+++ b/src/daemon/daemon.cpp
@@ -120,6 +120,7 @@ public:
if (shared)
{
core.get().get_blockchain_storage().add_block_notify(cryptonote::listener::zmq_pub::chain_main{shared});
+ core.get().get_blockchain_storage().add_miner_notify(cryptonote::listener::zmq_pub::miner_data{shared});
core.get().set_txpool_listener(cryptonote::listener::zmq_pub::txpool_add{shared});
}
}