pub enum FilterEvent {
    FilterReceived {
        from: PeerId,
        filter: BlockFilter,
        height: Height,
        block_hash: BlockHash,
    },
    FilterProcessed {
        block: BlockHash,
        height: Height,
        matched: bool,
        valid: bool,
        cached: bool,
    },
    FilterHeadersImported {
        count: usize,
        height: Height,
        block_hash: BlockHash,
    },
    OutOfSync {
        filter_height: Height,
        block_height: Height,
    },
    Syncing {
        peer: PeerId,
        start_height: Height,
        stop_height: Height,
        stop_hash: BlockHash,
    },
    RequestCanceled {
        reason: &'static str,
    },
    RescanStarted {
        start: Height,
        end: Option<Height>,
    },
    RescanCompleted {
        height: Height,
    },
    Synced(Height),
    TimedOut(PeerId),
    RollbackDetected(Height),
}
Expand description

An event originating in the CBF manager.

Variants

FilterReceived

Fields

from: PeerId

Peer we received from.

filter: BlockFilter

The received filter.

height: Height

Filter height.

block_hash: BlockHash

Hash of corresponding block.

Filter was received and validated.

FilterProcessed

Fields

block: BlockHash

The corresponding block hash.

height: Height

The filter height.

matched: bool

Whether or not this filter matched something in the watchlist.

valid: bool

Whether or not this filter was valid.

cached: bool

Filter was cached.

Filter was processed.

FilterHeadersImported

Fields

count: usize

Number of filter headers imported.

height: Height

New filter header chain height.

block_hash: BlockHash

Block hash corresponding to the tip of the filter header chain.

Filter headers were imported successfully.

OutOfSync

Fields

filter_height: Height

Height of filter header chain.

block_height: Height

Height of block header chain.

Filter header chain is out of sync with block headers.

Syncing

Fields

peer: PeerId

The remote peer.

start_height: Height

The start height from which we’re syncing.

stop_height: Height

The stop height to which we’re syncing.

stop_hash: BlockHash

The stop hash.

Started syncing filter headers with a peer.

RequestCanceled

Fields

reason: &'static str

Reason for cancellation.

Request canceled.

RescanStarted

Fields

start: Height

Start height.

end: Option<Height>

End height.

A rescan has started.

RescanCompleted

Fields

height: Height

Last height processed by rescan.

An active rescan has completed.

Synced(Height)

Finished syncing filter headers up to the specified height.

TimedOut(PeerId)

A peer has timed out responding to a filter request. TODO: Use event or remove.

RollbackDetected(Height)

Block header chain rollback detected. TODO: Use event or remove.

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
Formats the value using the given formatter. Read more
Converts to this type from the input type.

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.

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
Converts the given value to a String. 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.