From ba7aede59f6c4f1acc5c2f43bb3d694bb90d1c04 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 17 Jul 2024 14:50:07 +0200 Subject: [PATCH] feat: add start backfill sync fn --- crates/engine/tree/src/chain.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/engine/tree/src/chain.rs b/crates/engine/tree/src/chain.rs index e3f764beab6b..4ac015d23a5a 100644 --- a/crates/engine/tree/src/chain.rs +++ b/crates/engine/tree/src/chain.rs @@ -59,6 +59,13 @@ where &mut self.handler } + /// Triggers a backfill sync for the __valid__ given target. + /// + /// CAUTION: This function should be used with care and with a valid target. + pub fn start_backfill_sync(&mut self, target: impl Into) { + self.backfill_sync.on_action(BackfillAction::Start(target.into())); + } + /// Internal function used to advance the chain. /// /// Polls the `ChainOrchestrator` for the next event.