Module reputation

Source
Expand description

Peer reputation management

Structs§

ReputationChange
Represents a change in a peer’s reputation.
ReputationChangeWeights
How the ReputationChangeKind are weighted.

Enums§

ReputationChangeKind
Various kinds of reputation changes.
ReputationChangeOutcome
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
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 0 we still allow trusted peer penalization but less than untrusted peers.

Functions§

is_banned_reputation
Returns true if the given reputation is below the BANNED_REPUTATION threshold

Type Aliases§

Reputation
The type that tracks the reputation score.