diff options
| author | SChernykh <sergey.v.chernykh@gmail.com> | 2021-08-26 10:20:20 +0200 |
|---|---|---|
| committer | SChernykh <sergey.v.chernykh@gmail.com> | 2021-09-11 15:15:07 +0200 |
| commit | dfee15eee18a97be5a8fb9822527f98ebd1b33e9 (patch) | |
| tree | 9106c7164c9fab9b2453175c89a9288d5ee201bb /src/cryptonote_core/cryptonote_core.h | |
| parent | 2d3ce2d64a29caa9d2f526e01f9311a2eb676d6d (diff) | |
| download | monzero-core-dfee15eee18a97be5a8fb9822527f98ebd1b33e9.tar.gz monzero-core-dfee15eee18a97be5a8fb9822527f98ebd1b33e9.tar.xz monzero-core-dfee15eee18a97be5a8fb9822527f98ebd1b33e9.zip | |
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/cryptonote_core/cryptonote_core.h')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_core.h b/src/cryptonote_core/cryptonote_core.h index 8478049f9..dd813733f 100644 --- a/src/cryptonote_core/cryptonote_core.h +++ b/src/cryptonote_core/cryptonote_core.h @@ -237,6 +237,13 @@ namespace cryptonote virtual bool get_block_template(block& b, const crypto::hash *prev_block, const account_public_address& adr, difficulty_type& diffic, uint64_t& height, uint64_t& expected_reward, const blobdata& ex_nonce, uint64_t &seed_height, crypto::hash &seed_hash); /** + * @copydoc Blockchain::get_miner_data + * + * @note see Blockchain::get_miner_data + */ + bool get_miner_data(uint8_t& major_version, uint64_t& height, crypto::hash& prev_id, crypto::hash& seed_hash, difficulty_type& difficulty, uint64_t& median_weight, uint64_t& already_generated_coins, std::vector<tx_block_template_backlog_entry>& tx_backlog); + + /** * @brief called when a transaction is relayed. * @note Should only be invoked from `levin_notify`. */ |
