mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 03:18:52 +00:00
blockchain: silence an error getting blocks for pruned nodes
This happens often when a pre-pruning node asks a pruned node for data it does not have
This commit is contained in:
parent
6335509727
commit
3c071d203f
@ -1892,11 +1892,15 @@ bool Blockchain::handle_get_objects(NOTIFY_REQUEST_GET_OBJECTS::request& arg, NO
|
|||||||
get_transactions_blobs(bl.second.tx_hashes, e.txs, missed_tx_ids);
|
get_transactions_blobs(bl.second.tx_hashes, e.txs, missed_tx_ids);
|
||||||
|
|
||||||
if (missed_tx_ids.size() != 0)
|
if (missed_tx_ids.size() != 0)
|
||||||
|
{
|
||||||
|
// do not display an error if the peer asked for an unpruned block which we are not meant to have
|
||||||
|
if (tools::has_unpruned_block(get_block_height(bl.second), get_current_blockchain_height(), get_blockchain_pruning_seed()))
|
||||||
{
|
{
|
||||||
LOG_ERROR("Error retrieving blocks, missed " << missed_tx_ids.size()
|
LOG_ERROR("Error retrieving blocks, missed " << missed_tx_ids.size()
|
||||||
<< " transactions for block with hash: " << get_block_hash(bl.second)
|
<< " transactions for block with hash: " << get_block_hash(bl.second)
|
||||||
<< std::endl
|
<< std::endl
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// append missed transaction hashes to response missed_ids field,
|
// append missed transaction hashes to response missed_ids field,
|
||||||
// as done below if any standalone transactions were requested
|
// as done below if any standalone transactions were requested
|
||||||
|
Loading…
Reference in New Issue
Block a user