Merge pull request #8891

842478c core_rpc_server: return ID of submitted block (jeffro256)
This commit is contained in:
luigi1111 2023-08-17 10:18:12 -05:00
commit 894adef295
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
3 changed files with 17 additions and 2 deletions

View file

@ -2178,7 +2178,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";
@ -2201,6 +2202,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;
}