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

An event originating in the CBF manager.

Variants

FilterReceived

Fields

from: SocketAddr

Peer we received from.

filter: BlockFilter

The received filter.

height: u64

Filter height.

block_hash: BlockHash

Hash of corresponding block.

Filter was received and validated.

FilterProcessed

Fields

block: BlockHash

The corresponding block hash.

height: u64

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: u64

New filter header chain height.

block_hash: BlockHash

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

Filter headers were imported successfully.

Syncing

Fields

peer: SocketAddr

The remote peer.

start_height: u64

The start height from 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: u64

Start height.

end: Option<u64>

End height.

A rescan has started.

RescanCompleted

Fields

height: u64

Last height processed by rescan.

An active rescan has completed.

Synced(u64)

Finished syncing filter headers up to the specified height.

TimedOut(SocketAddr)

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

RollbackDetected(u64)

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

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.