Merge pull request #2357

58015df4 Fix getblocktemplate RPC returning wrong reserved_offset (Guillaume LE VAILLANT)
This commit is contained in:
Riccardo Spagni 2017-09-25 16:39:01 +02:00
commit 44ad32fd4a
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 1 additions and 1 deletions

View File

@ -948,7 +948,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;