pub fn oldest_non_pruned_trie(
	config: &Configuration,
	min_blocks_to_keep: u64,
	best_finalized_block: u64,
) -> u64 {
	let max_digest_interval = config.max_digest_interval();
	let max_digest_block = best_finalized_block - best_finalized_block % max_digest_interval;
	match pruning_range(config, min_blocks_to_keep, max_digest_block) {
		Some((_, last_pruned_block)) => last_pruned_block + 1,
		None => 1,
	}
}
/// Get number of oldest block for which changes trie is not pruned
/// given changes trie configuration, pruning parameter and number of
/// best finalized block.
Get number of oldest block for which changes trie is not pruned
given changes trie configuration, pruning parameter and number of
best finalized block.
Get number of oldest block for which changes trie is not pruned given changes trie configuration pruning parameter and number of best finalized block .
pub fn oldest_non_pruned_trie(
	config: &Configuration,
	min_blocks_to_keep: u64,
	best_finalized_block: u64,
) -> u64 {
	let max_digest_interval = config.max_digest_interval();
	let max_digest_block = best_finalized_block - best_finalized_block % max_digest_interval;
	match pruning_range(config, min_blocks_to_keep, max_digest_block) {
		Some((_, last_pruned_block)) => last_pruned_block + 1,
		None => 1,
	}
}
pub fn oldest_non_pruned_trie ( config : & Configuration , min_blocks_to_keep : u64 , best_finalized_block : u64 , ) -> u64 { let max_digest_interval = config . max_digest_interval ( ) ; let max_digest_block = best_finalized_block - best_finalized_block % max_digest_interval ; match pruning_range ( config , min_blocks_to_keep , max_digest_block ) { Some ( ( _ , last_pruned_block ) ) => last_pruned_block + 1 , None => 1 , } }
Get number of oldest block for which changes trie is not pruned
given changes trie configuration, pruning parameter and number of
best finalized block.
Get number of oldest block for which changes trie is not pruned given changes trie configuration pruning parameter and number of best finalized block .
config
&Configuration
min_blocks_to_keep
u64
best_finalized_block
u64
config
&Configuration
min_blocks_to_keep
u64
best_finalized_block
u64