rpc: add cumul weight field to block template resp

Resolves #9415
This commit is contained in:
jeffro256 2024-08-01 01:03:37 -05:00
parent caa62bc9ea
commit ac0af73222
No known key found for this signature in database
GPG key ID: 6F79797A6E392442
10 changed files with 31 additions and 24 deletions

View file

@ -171,9 +171,10 @@ namespace cryptonote
extra_nonce = m_extra_messages[m_config.current_extra_message_index];
}
uint64_t cumulative_weight;
uint64_t seed_height;
crypto::hash seed_hash;
if(!m_phandler->get_block_template(bl, m_mine_address, di, height, expected_reward, extra_nonce, seed_height, seed_hash))
if(!m_phandler->get_block_template(bl, m_mine_address, di, height, expected_reward, cumulative_weight, extra_nonce, seed_height, seed_hash))
{
LOG_ERROR("Failed to get_block_template(), stopping mining");
return false;

View file

@ -47,7 +47,7 @@ namespace cryptonote
struct i_miner_handler
{
virtual bool handle_block_found(block& b, block_verification_context &bvc) = 0;
virtual bool get_block_template(block& b, 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) = 0;
virtual bool get_block_template(block& b, const account_public_address& adr, difficulty_type& diffic, uint64_t& height, uint64_t& expected_reward, uint64_t &cumulative_weight, const blobdata& ex_nonce, uint64_t &seed_height, crypto::hash &seed_hash) = 0;
protected:
~i_miner_handler(){};
};