diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-04-16 22:39:18 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-04-16 22:39:18 +0200 |
commit | 45e1f7c2924ffe73e47c7c17951c8aef8c51dfab (patch) | |
tree | ec283aeeae95cedd643433250d68fe276e20426d /src/rpc/core_rpc_server.cpp | |
parent | Merge pull request #5425 (diff) | |
parent | rpc.getblocktemplate: set reserved_offset to zero when reserve_size==0 (diff) | |
download | monero-45e1f7c2924ffe73e47c7c17951c8aef8c51dfab.tar.xz |
Merge pull request #5428
f3425f8d rpc.getblocktemplate: set reserved_offset to zero when reserve_size==0 (stoffu)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 39a8b4745..52d30e526 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -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; |