pub struct NaiveProvider {
pub state: State,
pub fifo_txs: Vec<Tx>,
pub acknowledged_count: usize,
pub requested_ids_count: usize,
pub requested_txs: Option<Vec<TxId>>,
}
Expand description
A very basic tx provider agent with a fixed set of tx to submit
This provider takes a set of tx from a vec as the single, static source of data to transfer to the consumer. It’s main use is for implementing peers that need to answer to v1 implementations of the Tx-Submission mini-protocol. Since v1 nodes dont’ wait for a ‘Hello’ message, the peer needs to be prepared to receive Tx requests. This naive provider serves as a good placeholder for those scenarios.
Fields§
§state: State
§fifo_txs: Vec<Tx>
§acknowledged_count: usize
§requested_ids_count: usize
§requested_txs: Option<Vec<TxId>>
Implementations§
Trait Implementations§
Source§impl Agent for NaiveProvider
impl Agent for NaiveProvider
type Message = Message
fn is_done(&self) -> bool
fn has_agency(&self) -> bool
fn send_next(self, tx: &impl MachineOutput) -> Transition<Self>
fn receive_next(self, msg: Self::Message) -> Transition<Self>
Auto Trait Implementations§
impl Freeze for NaiveProvider
impl RefUnwindSafe for NaiveProvider
impl Send for NaiveProvider
impl Sync for NaiveProvider
impl Unpin for NaiveProvider
impl UnwindSafe for NaiveProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more