mirror of
https://github.com/wownero/wownero.git
synced 2026-11-14 04:13:54 +01:00
rpc: fix block template reserved offset
This commit is contained in:
@@ -40,6 +40,7 @@ using namespace epee;
|
||||
#include "common/updates.h"
|
||||
#include "common/download.h"
|
||||
#include "common/util.h"
|
||||
#include "common/varint.h"
|
||||
#include "common/perf_timer.h"
|
||||
#include "int-util.h"
|
||||
#include "cryptonote_basic/cryptonote_format_utils.h"
|
||||
@@ -1802,7 +1803,7 @@ namespace cryptonote
|
||||
LOG_ERROR("Failed to find tx pub key in blockblob");
|
||||
return false;
|
||||
}
|
||||
reserved_offset += sizeof(tx_pub_key) + 2; //2 bytes: tag for TX_EXTRA_NONCE(1 byte), counter in TX_EXTRA_NONCE(1 byte)
|
||||
reserved_offset += sizeof(tx_pub_key) + 1 + tools::get_varint_byte_size(extra_nonce.size());
|
||||
if(reserved_offset + extra_nonce.size() > block_blob.size())
|
||||
{
|
||||
error_resp.code = CORE_RPC_ERROR_CODE_INTERNAL_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user