tempo_commonware_node/feed/
mod.rs1mod actor;
11mod ingress;
12mod state;
13
14use std::sync::Arc;
15
16use commonware_consensus::types::FixedEpocher;
17use commonware_runtime::Spawner;
18use futures::channel::mpsc;
19use tempo_node::TempoFullNode;
20
21use crate::alias::marshal;
22pub(crate) use actor::Actor;
23pub(crate) use ingress::Mailbox;
24pub use state::FeedStateHandle;
25
26pub(crate) fn init<TContext: Spawner>(
28 context: TContext,
29 marshal: marshal::Mailbox,
30 epocher: FixedEpocher,
31 execution_node: Arc<TempoFullNode>,
32 state: FeedStateHandle,
33) -> (Actor<TContext>, Mailbox) {
34 let (tx, rx) = mpsc::unbounded();
35 let mailbox = Mailbox::new(tx);
36 let actor = Actor::new(context, marshal, epocher, execution_node, rx, state);
37 (actor, mailbox)
38}