Skip to content

Commit

Permalink
Raft: remove TODO. Trust all peers.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsanjuan committed May 13, 2019
1 parent d468ea5 commit 21032f2
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions consensus/raft/consensus.go
Expand Up @@ -230,13 +230,6 @@ func (cc *Consensus) Ready(ctx context.Context) <-chan struct{} {
}

// IsTrustedPeer returns true. In Raft we trust all peers.
//
// TODO: There is a potential improvement here by just trusting peers which
// are currently part of the Raft peerset. But we cannot call Peers() every
// single time and should keep a cache of trusted peers indexed by peer which
// is difficult to maintain when peers are removed (we get no
// notification). All in all, since PeerAdd is effectively open to everyone in
// Cluster, it makes little difference.
func (cc *Consensus) IsTrustedPeer(ctx context.Context, p peer.ID) bool {
return true
}
Expand Down

0 comments on commit 21032f2

Please sign in to comment.