diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index d337da3..fd743a6 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -341,6 +341,7 @@ namespace config {1051200, {"7c379c2bc138891edefff03fb0b935c494a39023c83426f45465ba90e85f0f64", "1d6086d0615688bd41388680bb5b8910f98a998bcddb7d9a67a97d3732e7e5e1", "051f05a65b823794c34f507645e47063", "799c06"}}, }; const std::vector MERGE_MINING_AUTHORIZED_PUBKEYS = { + "4cd1637fc003af800a7d4d7daed198571abe09dad85a65460dd839123a6095a5", }; // Hash domain separators diff --git a/src/merge_mining_proxy/merge_mining_proxy.cpp b/src/merge_mining_proxy/merge_mining_proxy.cpp index 40afc31..3e24383 100644 --- a/src/merge_mining_proxy/merge_mining_proxy.cpp +++ b/src/merge_mining_proxy/merge_mining_proxy.cpp @@ -858,8 +858,16 @@ bool merge_mining_proxy::on_submit_block(const cryptonote::COMMAND_RPC_SUBMITBLO << ", aux_diff=" << state.mm_aux_difficulty << ", parent_diff=" << state.mm_parent_difficulty); + res.aux_accepted = accepted_aux; + res.parent_accepted = accepted_parent; + res.parent_height = 0; + if (accepted_aux) + { + res.aux_block_id = epee::string_tools::pod_to_hex(aux_block_hash); + res.aux_height = cryptonote::get_block_height(aux_block); + } if (accepted_aux && !accepted_parent) - res.block_id = epee::string_tools::pod_to_hex(aux_block_hash); + res.block_id = res.aux_block_id; if (accepted_aux || accepted_parent) { res.status = CORE_RPC_STATUS_OK; diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index eecd8ef..fe375e6 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -1155,10 +1155,22 @@ namespace cryptonote struct response_t: public rpc_response_base { std::string block_id; + std::string aux_block_id; + uint64_t aux_height; + uint64_t parent_height; + bool aux_accepted; + bool parent_accepted; + + response_t(): aux_height(0), parent_height(0), aux_accepted(false), parent_accepted(false) {} BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE_PARENT(rpc_response_base) KV_SERIALIZE(block_id) + KV_SERIALIZE(aux_block_id) + KV_SERIALIZE(aux_height) + KV_SERIALIZE(parent_height) + KV_SERIALIZE(aux_accepted) + KV_SERIALIZE(parent_accepted) END_KV_SERIALIZE_MAP() }; typedef epee::misc_utils::struct_init response;