diff --git a/pallas-chainsync/src/clients.rs b/pallas-chainsync/src/clients.rs index e439e8b..a02669c 100644 --- a/pallas-chainsync/src/clients.rs +++ b/pallas-chainsync/src/clients.rs @@ -10,8 +10,8 @@ use crate::{BlockBody, Message, State, Tip, WrappedHeader}; /// An observer of chain-sync events sent by the state-machine pub trait Observer where C: Debug { - fn on_block(&self, content: &C) -> Result<(), Box> { - log::debug!("asked to save block {:?}", content); + fn on_block(&self, cursor: &Option, content: &C) -> Result<(), Box> { + log::debug!("asked to save block content {:?} at cursor {:?}", content, cursor); Ok(()) } @@ -127,7 +127,7 @@ where } debug!("reporint block to observer"); - self.observer.on_block(&content)?; + self.observer.on_block(&self.cursor, &content)?; Ok(Self { tip: Some(tip),