pub trait IndexerSync {
// Required methods
fn tip(&self) -> Result<Option<(BlockNumber, Byte32)>, Error>;
fn append(&self, block: &BlockView) -> Result<(), Error>;
fn rollback(&self) -> Result<(), Error>;
fn get_identity(&self) -> &str;
fn set_init_tip(&self, init_tip_number: u64, init_tip_hash: &H256);
}
Expand description
Trait for an indexer’s synchronization interface
Required Methods§
Sourcefn get_identity(&self) -> &str
fn get_identity(&self) -> &str
Get indexer identity
Sourcefn set_init_tip(&self, init_tip_number: u64, init_tip_hash: &H256)
fn set_init_tip(&self, init_tip_number: u64, init_tip_hash: &H256)
Set init tip