MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / MarkPeerAsGood

Method MarkPeerAsGood

p2p/switch.go:486–490  ·  view source on GitHub ↗

MarkPeerAsGood marks the given peer as good when it did something useful like contributed to consensus.

(peer Peer)

Source from the content-addressed store, hash-verified

484// MarkPeerAsGood marks the given peer as good when it did something useful
485// like contributed to consensus.
486func (sw *Switch) MarkPeerAsGood(peer Peer) {
487 if sw.addrBook != nil {
488 sw.addrBook.MarkGood(peer.ID())
489 }
490}
491
492//---------------------------------------------------------------------
493// Dialing

Callers 3

peerStatsRoutineMethod · 0.80
ReportMethod · 0.80
peerStatsRoutineMethod · 0.80

Calls 2

MarkGoodMethod · 0.65
IDMethod · 0.65

Tested by

no test coverage detected