pub enum PriorityTask {
    PropagateBlock {
        started: Instant,
        block: Bytes,
        hash: H256,
        difficulty: U256,
    },
    PropagateTransactions(InstantArc<AtomicBool>),
}
Expand description

A prioritized tasks run in a specialised timer. Every task should be completed within a hard deadline, if it’s not it’s either cancelled or split into multiple tasks. NOTE These tasks might not complete at all, so anything that happens here should work even if the task is cancelled.

Variants

PropagateBlock

Fields

started: Instant

When the task was initiated

block: Bytes

Raw block RLP to propagate

hash: H256

Block hash

difficulty: U256

Blocks difficulty

Propagate given block

PropagateTransactions(InstantArc<AtomicBool>)

Propagate a list of transactions

Implementations

Mark the task as being processed, right after it’s retrieved from the queue.

Trait Implementations

Formats the value using the given formatter. 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.

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 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.