diff --git a/processor/scanner/src/db.rs b/processor/scanner/src/db.rs index ef37ef38..5fcdc160 100644 --- a/processor/scanner/src/db.rs +++ b/processor/scanner/src/db.rs @@ -120,7 +120,7 @@ impl ScannerGlobalDb { /// A new key MUST NOT be queued to activate a block preceding the finishing of the key prior to /// its prior. There MUST only be two keys active at one time. /// - /// activation_block_number is inclusive, so the key will be scanned for starting at the + /// `activation_block_number` is inclusive, so the key will be scanned for starting at the /// specified block. pub(crate) fn queue_key(txn: &mut impl DbTxn, activation_block_number: u64, key: KeyFor) { // Set the block which has a key activate as notable diff --git a/processor/scanner/src/eventuality/mod.rs b/processor/scanner/src/eventuality/mod.rs index be5b4555..5d139c6d 100644 --- a/processor/scanner/src/eventuality/mod.rs +++ b/processor/scanner/src/eventuality/mod.rs @@ -123,8 +123,8 @@ impl> EventualityTask { block_number: u64, ) -> (Vec>>, Vec<(KeyFor, LifetimeStage)>) { /* - This is proper as the keys for the next-to-scan block (at most `WINDOW_LENGTH` ahead, - which is `<= CONFIRMATIONS`) will be the keys to use here, with only minor edge cases. + This is proper as the keys for the next-to-scan block (at most `WINDOW_LENGTH` ahead) will be + the keys to use here, with only minor edge cases. This may include a key which has yet to activate by our perception. We can simply drop those. @@ -136,7 +136,6 @@ impl> EventualityTask { This also may include a key we've retired which has yet to officially retire. That's fine as we'll do nothing with it, and the Scheduler traits document this behavior. */ - assert!(S::WINDOW_LENGTH <= S::CONFIRMATIONS); let mut keys = ScannerGlobalDb::::active_keys_as_of_next_to_scan_for_outputs_block(&self.db) .expect("scanning for a blockchain without any keys set"); // Since the next-to-scan block is ahead of us, drop keys which have yet to actually activate diff --git a/processor/scanner/src/lib.rs b/processor/scanner/src/lib.rs index 9831d41a..2c56db35 100644 --- a/processor/scanner/src/lib.rs +++ b/processor/scanner/src/lib.rs @@ -71,8 +71,8 @@ pub trait ScannerFeed: 'static + Send + Sync + Clone { /// The amount of blocks to process in parallel. /// - /// This must be at least `1`. This must be less than or equal to `CONFIRMATIONS`. This value - /// should be the worst-case latency to handle a block divided by the expected block time. + /// This must be at least `1`. This value should be the worst-case latency to handle a block + /// divided by the expected block time. const WINDOW_LENGTH: u64; /// The amount of blocks which will occur in 10 minutes (approximate).