aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuillaume LE VAILLANT <glv@posteo.net>2017-08-26 18:38:27 +0200
committerGuillaume LE VAILLANT <glv@posteo.net>2017-08-26 18:38:27 +0200
commit58015df4cf927d8d67e01f589b3564fed423fd80 (patch)
tree8181294989254aea1b0a70f2d0fa4d12581df59a /src
parentMerge pull request #2311 (diff)
downloadmonero-58015df4cf927d8d67e01f589b3564fed423fd80.tar.xz
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.
Diffstat (limited to 'src')
-rw-r--r--src/rpc/core_rpc_server.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index a5de36118..c662edcd9 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -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;