mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #5428
f3425f8d
rpc.getblocktemplate: set reserved_offset to zero when reserve_size==0 (stoffu)
This commit is contained in:
commit
45e1f7c292
1 changed files with 4 additions and 1 deletions
|
@ -1296,7 +1296,10 @@ namespace cryptonote
|
|||
LOG_ERROR("Failed to find tx pub key in blockblob");
|
||||
return false;
|
||||
}
|
||||
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 (req.reserve_size)
|
||||
res.reserved_offset += sizeof(tx_pub_key) + 2; //2 bytes: tag for TX_EXTRA_NONCE(1 byte), counter in TX_EXTRA_NONCE(1 byte)
|
||||
else
|
||||
res.reserved_offset = 0;
|
||||
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