mirror of
https://github.com/monero-project/monero.git
synced 2025-08-05 12:44:26 -04:00
Merge pull request #8890
e8cac61
core_rpc_server: return ID of submitted block (jeffro256)
This commit is contained in:
commit
30ba5a5280
3 changed files with 17 additions and 2 deletions
|
@ -2216,7 +2216,8 @@ namespace cryptonote
|
|||
// Fixing of high orphan issue for most pools
|
||||
// Thanks Boolberry!
|
||||
block b;
|
||||
if(!parse_and_validate_block_from_blob(blockblob, b))
|
||||
crypto::hash blk_id;
|
||||
if(!parse_and_validate_block_from_blob(blockblob, b, blk_id))
|
||||
{
|
||||
error_resp.code = CORE_RPC_ERROR_CODE_WRONG_BLOCKBLOB;
|
||||
error_resp.message = "Wrong block blob";
|
||||
|
@ -2239,6 +2240,7 @@ namespace cryptonote
|
|||
error_resp.message = "Block not accepted";
|
||||
return false;
|
||||
}
|
||||
res.block_id = epee::string_tools::pod_to_hex(blk_id);
|
||||
res.status = CORE_RPC_STATUS_OK;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace cryptonote
|
|||
// advance which version they will stop working with
|
||||
// Don't go over 32767 for any of these
|
||||
#define CORE_RPC_VERSION_MAJOR 3
|
||||
#define CORE_RPC_VERSION_MINOR 12
|
||||
#define CORE_RPC_VERSION_MINOR 13
|
||||
#define MAKE_CORE_RPC_VERSION(major,minor) (((major)<<16)|(minor))
|
||||
#define CORE_RPC_VERSION MAKE_CORE_RPC_VERSION(CORE_RPC_VERSION_MAJOR, CORE_RPC_VERSION_MINOR)
|
||||
|
||||
|
@ -1115,8 +1115,11 @@ namespace cryptonote
|
|||
|
||||
struct response_t: public rpc_response_base
|
||||
{
|
||||
std::string block_id;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE_PARENT(rpc_response_base)
|
||||
KV_SERIALIZE(block_id)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
typedef epee::misc_utils::struct_init<response_t> response;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue