mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor(prune): segment trait, receipts impl (#4887)
This commit is contained in:
@ -51,12 +51,12 @@ pub struct SnapshotTargets {
|
||||
}
|
||||
|
||||
impl SnapshotTargets {
|
||||
/// Returns `true` if any of the data parts has targets, i.e. is [`Some`].
|
||||
/// Returns `true` if any of the targets are [Some].
|
||||
pub fn any(&self) -> bool {
|
||||
self.headers.is_some() || self.receipts.is_some() || self.transactions.is_some()
|
||||
}
|
||||
|
||||
/// Returns `true` if all targets are either [`None`] or multiple of `block_interval`.
|
||||
/// Returns `true` if all targets are either [None] or multiple of `block_interval`.
|
||||
fn is_multiple_of_block_interval(&self, block_interval: u64) -> bool {
|
||||
[
|
||||
self.headers.as_ref(),
|
||||
|
||||
Reference in New Issue
Block a user