pub trait MempoolNetwork<T: Transaction> {
// Required method
fn gossip(&mut self, genesis: [u8; 32], transaction: T);
}Expand description
The network for the mempool.
Required Methods§
Sourcefn gossip(&mut self, genesis: [u8; 32], transaction: T)
fn gossip(&mut self, genesis: [u8; 32], transaction: T)
Gossip an (un)signed transaction.
The mempool will automatically re-gossip transactions which have yet to be included on-chain. Accordingly, this gossip layer SHOULD have some layer of intelligence, being able to de-duplicate and rate-limit gossiped transactions (in case the mempool is over-eager).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T: Transaction> MempoolNetwork<T> for ()
A stub implementation which does not implement any gossip functionality.
impl<T: Transaction> MempoolNetwork<T> for ()
A stub implementation which does not implement any gossip functionality.
This likely SHOULD NOT be used.