Expand description
Peer reputation management
Structs§
- Reputation
Change - Represents a change in a peer’s reputation.
- Reputation
Change Weights - How the
ReputationChangeKindare weighted.
Enums§
- Reputation
Change Kind - Various kinds of reputation changes.
- Reputation
Change Outcome - Outcomes when a reputation change is applied to a peer
Constants§
- BANNED_
REPUTATION - The reputation value below which new connection from/to peers are rejected.
- DEFAULT_
REPUTATION - The default reputation of a peer
- FAILED_
TO_ CONNECT_ REPUTATION_ CHANGE - The reputation change to apply to a peer that we failed to connect to.
- MAX_
TRUSTED_ PEER_ REPUTATION_ CHANGE - The maximum reputation change that can be applied to a trusted peer.
This is used to prevent a single bad message from a trusted peer to cause a significant change.
This gives a trusted peer more leeway when interacting with the node, which is useful for in
custom setups. By not setting this to
0we still allow trusted peer penalization but less than untrusted peers.
Functions§
- is_
banned_ reputation - Returns
trueif the given reputation is below theBANNED_REPUTATIONthreshold - is_
connection_ failed_ reputation - Returns
trueif the given reputation is below theFAILED_TO_CONNECT_REPUTATION_CHANGEthreshold
Type Aliases§
- Reputation
- The type that tracks the reputation score.