mirror of
https://github.com/monero-project/monero.git
synced 2024-12-24 12:39:59 +00:00
Fix getblocktemplate RPC returning wrong reserved_offset
The byte for TX_EXTRA_TAG_PUBKEY is already included in res.reserved_offset by the call to slow_memmem.
This commit is contained in:
parent
335681896a
commit
58015df4cf
1 changed files with 1 additions and 1 deletions
|
@ -945,7 +945,7 @@ namespace cryptonote
|
|||
LOG_ERROR("Failed to find tx pub key in blockblob");
|
||||
return false;
|
||||
}
|
||||
res.reserved_offset += sizeof(tx_pub_key) + 3; //3 bytes: tag for TX_EXTRA_TAG_PUBKEY(1 byte), tag for TX_EXTRA_NONCE(1 byte), counter in TX_EXTRA_NONCE(1 byte)
|
||||
res.reserved_offset += sizeof(tx_pub_key) + 2; //2 bytes: tag for TX_EXTRA_NONCE(1 byte), counter in TX_EXTRA_NONCE(1 byte)
|
||||
if(res.reserved_offset + req.reserve_size > block_blob.size())
|
||||
{
|
||||
error_resp.code = CORE_RPC_ERROR_CODE_INTERNAL_ERROR;
|
||||
|
|
Loading…
Reference in a new issue