cryptonote_protocol: don't synced pruned blocks before v11

There are a few Borromean proofs txes in the v8 era, and these
aren't supported by get_pruned_transaction_weight. Moreover, only
only the most recent variant of bulletproofs is currently supported.
This commit is contained in:
cohcho 2020-08-08 17:51:43 +00:00 committed by moneromooo-monero
parent 5d850dde99
commit 4ff2074c74
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

View File

@ -1928,8 +1928,8 @@ skip:
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) // 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); static const uint64_t bp_fork_height = m_core.get_earliest_ideal_height_for_version(HF_VERSION_SMALLER_BP);
if (first_block_height + nblocks - 1 < bp_fork_height) if (first_block_height < bp_fork_height)
return false; 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