input-output-hk / mithril

Stake-based threshold multi-signatures protocol
https://mithril.network
Apache License 2.0
116 stars 36 forks source link

Block Streamer returns `ChainScannedBlocks` #1704

Closed jpraynaud closed 1 month ago

jpraynaud commented 2 months ago

Why

We need the block scanners to return list of ChainBlockNextActions instead of Vec<ScannedBlock> in order to be able to handle rollbacks.

What

Adapt the BlockStreamer interface and implementations to return a ChainScannedBlocks (name TBD):

enum ChainScannedBlocks {
  RollForwards(Vec<ScannedBlock>),
  RollBackward(ChainPoint)
}

How