Skip to main content

ticket_manager_from_chain

Function ticket_manager_from_chain 

Source
pub async fn ticket_manager_from_chain<C>(
    connector: &C,
) -> Result<(Arc<HoprTicketManager<RedbStore, RedbTicketQueue>>, Arc<HoprTicketFactory<RedbStore>>), TicketManagerError>
where C: ChainReadChannelOperations, C::Error: Display,
Expand description

Creates a HoprTicketManager and its companion HoprTicketFactory, both backed by a temporary RedbStore, and pre-seeds them from the node’s current channel state.

Use this when building a full relay node that both issues and redeems tickets. The factory is pre-seeded from outgoing channels and the manager from incoming channels. For edge nodes that do not redeem tickets, use ticket_factory_from_chain instead.