reth_network_p2p::error

Trait EthResponseValidator

Source
pub trait EthResponseValidator {
    // Required methods
    fn is_likely_bad_headers_response(&self, request: &HeadersRequest) -> bool;
    fn reputation_change_err(&self) -> Option<ReputationChangeKind>;
}
Expand description

Helper trait used to validate responses.

Required Methods§

Source

fn is_likely_bad_headers_response(&self, request: &HeadersRequest) -> bool

Determine whether the response matches what we requested in HeadersRequest

Source

fn reputation_change_err(&self) -> Option<ReputationChangeKind>

Return the response reputation impact if any

Implementors§

Source§

impl<H: BlockHeader> EthResponseValidator for RequestResult<Vec<H>>