mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-22 23:42:24 +00:00
rpc: add option to skip coinbase info in get_blocks.bin
This commit is contained in:
parent
a2b557fe5c
commit
6795bd0d4e
3 changed files with 10 additions and 4 deletions
|
@ -249,11 +249,14 @@ namespace cryptonote
|
||||||
res.status = "Invalid block";
|
res.status = "Invalid block";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool r = m_core.get_tx_outputs_gindexs(get_transaction_hash(b.miner_tx), res.output_indices.back().indices.back().indices);
|
if (!req.no_miner_tx)
|
||||||
if (!r)
|
|
||||||
{
|
{
|
||||||
res.status = "Failed";
|
bool r = m_core.get_tx_outputs_gindexs(get_transaction_hash(b.miner_tx), res.output_indices.back().indices.back().indices);
|
||||||
return false;
|
if (!r)
|
||||||
|
{
|
||||||
|
res.status = "Failed";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
size_t txidx = 0;
|
size_t txidx = 0;
|
||||||
ntxes += bd.second.size();
|
ntxes += bd.second.size();
|
||||||
|
|
|
@ -83,10 +83,12 @@ namespace cryptonote
|
||||||
std::list<crypto::hash> block_ids; //*first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block */
|
std::list<crypto::hash> block_ids; //*first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block */
|
||||||
uint64_t start_height;
|
uint64_t start_height;
|
||||||
bool prune;
|
bool prune;
|
||||||
|
bool no_miner_tx;
|
||||||
BEGIN_KV_SERIALIZE_MAP()
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
KV_SERIALIZE_CONTAINER_POD_AS_BLOB(block_ids)
|
KV_SERIALIZE_CONTAINER_POD_AS_BLOB(block_ids)
|
||||||
KV_SERIALIZE(start_height)
|
KV_SERIALIZE(start_height)
|
||||||
KV_SERIALIZE(prune)
|
KV_SERIALIZE(prune)
|
||||||
|
KV_SERIALIZE_OPT(no_miner_tx, false)
|
||||||
END_KV_SERIALIZE_MAP()
|
END_KV_SERIALIZE_MAP()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1684,6 +1684,7 @@ void wallet2::pull_blocks(uint64_t start_height, uint64_t &blocks_start_height,
|
||||||
}
|
}
|
||||||
|
|
||||||
req.start_height = start_height;
|
req.start_height = start_height;
|
||||||
|
req.no_miner_tx = m_refresh_type == RefreshNoCoinbase;
|
||||||
m_daemon_rpc_mutex.lock();
|
m_daemon_rpc_mutex.lock();
|
||||||
bool r = net_utils::invoke_http_bin("/getblocks.bin", req, res, m_http_client, rpc_timeout);
|
bool r = net_utils::invoke_http_bin("/getblocks.bin", req, res, m_http_client, rpc_timeout);
|
||||||
m_daemon_rpc_mutex.unlock();
|
m_daemon_rpc_mutex.unlock();
|
||||||
|
|
Loading…
Reference in a new issue