pub struct PeerStore { /* private fields */ }
Expand description

Peer store

| – choose to identify –| — choose to feeler — | – delete – | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | More than seven days |

Implementations

Init peer store from disk

Dump all info to disk

New with address list and ban list

this method will assume peer is connected, which implies address is “verified”.

Add discovered peer address this method will assume peer and addr is untrust since we have not connected to it.

Add outbound peer address

Get address manager

Get mut address manager

Report peer behaviours

Remove peer id

Get peer status

Get peers for outbound connection, this method randomly return recently connected peer addrs

Get peers for feeler connection, this method randomly return peer addrs that we never connected to.

Return valid addrs that success connected, used for discovery.

Whether the address is banned

Get ban list

Get mut ban list

Clear ban list

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

TODO(doc): @quake

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.

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