pub fn create_block_handler<P: ClientPoolTrait + 'static>(
shutdown_tx: Sender<bool>,
filter_service: Arc<FilterService>,
active_monitors: Vec<Monitor>,
client_pools: Arc<P>,
contract_specs: Vec<(String, ContractSpec)>,
) -> Arc<impl Fn(BlockType, Network) -> BoxFuture<'static, ProcessedBlock> + Send + Sync>
Expand description
Creates a block handler function that processes new blocks from the blockchain.
§Arguments
shutdown_tx
- Watch channel for shutdown signalsfilter_service
- Service for filtering blockchain dataactive_monitors
- List of active monitorsclient_pools
- Client pools for accessing blockchain clients
§Returns
Returns a function that handles incoming blocks