[−][src]Struct grin_servers::common::types::DandelionEpoch
A node is either "stem" of "fluff" for the duration of a single epoch. A node also maintains an outbound relay peer for the epoch.
Implementations
impl DandelionEpoch
[src]
pub fn new(config: DandelionConfig) -> DandelionEpoch
[src]
Create a new Dandelion epoch, defaulting to "stem" and no outbound relay peer.
pub fn is_expired(&self) -> bool
[src]
Is the current Dandelion epoch expired? It is expired if start_time is older than the configured epoch_secs.
pub fn next_epoch(&mut self, peers: &Arc<Peers>)
[src]
Transition to next Dandelion epoch. Select stem/fluff based on configured stem_probability. Choose a new outbound stem relay peer.
pub fn is_stem(&self) -> bool
[src]
Are we stemming (or fluffing) transactions in this epoch?
pub fn always_stem_our_txs(&self) -> bool
[src]
Always stem our (pushed via api) txs regardless of stem/fluff epoch?
pub fn relay_peer(&mut self, peers: &Arc<Peers>) -> Option<Arc<Peer>>
[src]
What is our current relay peer? If it is not connected then choose a new one.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DandelionEpoch
impl Send for DandelionEpoch
impl Sync for DandelionEpoch
impl Unpin for DandelionEpoch
impl !UnwindSafe for DandelionEpoch
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,