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