pub enum Trigger {
    Instant,
    Never,
    Interval {
        block_time: Duration,
    },
    Hybrid {
        min_block_time: Duration,
        max_tx_idle_time: Duration,
        max_block_time: Duration,
    },
}
Expand description

Block production trigger for PoA operation

Variants§

§

Instant

A new block is produced instantly when transactions are available. This is useful for some test cases.

§

Never

This node doesn’t produce new blocks. Used for passive listener nodes.

§

Interval

Fields

§block_time: Duration

A new block is produced periodically. Used to simulate consensus block delay.

§

Hybrid

Fields

§min_block_time: Duration

Minimum time between two blocks, even if there are more txs available

§max_tx_idle_time: Duration

If there are txs available, but not enough for a full block, this is how long the block is waiting for more txs

§max_block_time: Duration

Time after which a new block is produced, even if it’s empty

A new block will be produced when the timer runs out. Set to max_block_time when the txpool is empty, otherwise min(max_block_time, max_tx_idle_time). If it expires, but minimum block time hasn’t expired yet, then the deadline is set to last_block_created + min_block_time. See https://github.com/FuelLabs/fuel-core/issues/50#issuecomment-1241895887 Requires min_block_time <= max_tx_idle_time <= max_block_time.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more