mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
cryptonote_protocol: do not request pruned borromean sig txes
We don't have a function to calculate their weight from a pruned version (yet).
This commit is contained in:
parent
e1bba18cc5
commit
b59ef9a359
1 changed files with 6 additions and 1 deletions
|
@ -1907,6 +1907,10 @@ skip:
|
||||||
const uint32_t local_stripe = tools::get_pruning_stripe(m_core.get_blockchain_pruning_seed());
|
const uint32_t local_stripe = tools::get_pruning_stripe(m_core.get_blockchain_pruning_seed());
|
||||||
if (local_stripe == 0)
|
if (local_stripe == 0)
|
||||||
return false;
|
return false;
|
||||||
|
// don't request pre-bulletprooof pruned blocks, we can't reconstruct their weight (yet)
|
||||||
|
static const uint64_t bp_fork_height = m_core.get_earliest_ideal_height_for_version(8);
|
||||||
|
if (first_block_height + nblocks - 1 < bp_fork_height)
|
||||||
|
return false;
|
||||||
// assumes the span size is less or equal to the stripe size
|
// assumes the span size is less or equal to the stripe size
|
||||||
bool full_data_needed = tools::get_pruning_stripe(first_block_height, context.m_remote_blockchain_height, CRYPTONOTE_PRUNING_LOG_STRIPES) == local_stripe
|
bool full_data_needed = tools::get_pruning_stripe(first_block_height, context.m_remote_blockchain_height, CRYPTONOTE_PRUNING_LOG_STRIPES) == local_stripe
|
||||||
|| tools::get_pruning_stripe(first_block_height + nblocks - 1, context.m_remote_blockchain_height, CRYPTONOTE_PRUNING_LOG_STRIPES) == local_stripe;
|
|| tools::get_pruning_stripe(first_block_height + nblocks - 1, context.m_remote_blockchain_height, CRYPTONOTE_PRUNING_LOG_STRIPES) == local_stripe;
|
||||||
|
@ -2083,7 +2087,8 @@ skip:
|
||||||
skip_unneeded_hashes(context, false);
|
skip_unneeded_hashes(context, false);
|
||||||
|
|
||||||
const uint64_t first_block_height = context.m_last_response_height - context.m_needed_objects.size() + 1;
|
const uint64_t first_block_height = context.m_last_response_height - context.m_needed_objects.size() + 1;
|
||||||
bool sync_pruned_blocks = m_sync_pruned_blocks && m_core.get_blockchain_pruning_seed();
|
static const uint64_t bp_fork_height = m_core.get_earliest_ideal_height_for_version(8);
|
||||||
|
bool sync_pruned_blocks = m_sync_pruned_blocks && first_block_height >= bp_fork_height && m_core.get_blockchain_pruning_seed();
|
||||||
span = m_block_queue.reserve_span(first_block_height, context.m_last_response_height, count_limit, context.m_connection_id, sync_pruned_blocks, m_core.get_blockchain_pruning_seed(), context.m_pruning_seed, context.m_remote_blockchain_height, context.m_needed_objects);
|
span = m_block_queue.reserve_span(first_block_height, context.m_last_response_height, count_limit, context.m_connection_id, sync_pruned_blocks, m_core.get_blockchain_pruning_seed(), context.m_pruning_seed, context.m_remote_blockchain_height, context.m_needed_objects);
|
||||||
MDEBUG(context << " span from " << first_block_height << ": " << span.first << "/" << span.second);
|
MDEBUG(context << " span from " << first_block_height << ": " << span.first << "/" << span.second);
|
||||||
if (span.second > 0)
|
if (span.second > 0)
|
||||||
|
|
Loading…
Reference in a new issue