summaryrefslogtreecommitdiff
path: root/src/blocks_cache.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/blocks_cache.rs')
-rw-r--r--src/blocks_cache.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/blocks_cache.rs b/src/blocks_cache.rs
index 1e607a6..555ac49 100644
--- a/src/blocks_cache.rs
+++ b/src/blocks_cache.rs
@@ -32,6 +32,15 @@ impl BlocksCache {
pub fn get_computed(&self) -> &[ComputedBlock] {
&self.computed
}
+
+ pub fn config_changed(&mut self, config: &Config) {
+ let blocks = self
+ .computed
+ .drain(..)
+ .map(|computed| computed.block)
+ .collect();
+ self.process_new_blocks(config, blocks);
+ }
}
impl ComputedBlock {