mirror of
https://github.com/libp2p/go-libp2p-core.git
synced 2024-12-27 23:40:11 +08:00
rm batching SignedRoutingStates accessor in peerstore
the datastore peerstore implementation doesn't support batched reads, so it's no more efficient to get a bunch of states at once than it is to call SignedRoutingState multiple times.
This commit is contained in:
parent
e8ab218f27
commit
7611d378ae
@ -136,12 +136,6 @@ type AddrBook interface {
|
|||||||
// given peer id, if one exists in the peerstore.
|
// given peer id, if one exists in the peerstore.
|
||||||
// Returns nil if no routing state exists for the peer.
|
// Returns nil if no routing state exists for the peer.
|
||||||
SignedRoutingState(p peer.ID) *routing.SignedRoutingState
|
SignedRoutingState(p peer.ID) *routing.SignedRoutingState
|
||||||
|
|
||||||
// SignedRoutingStates returns SignedRoutingState records for each of
|
|
||||||
// the given peer ids, if one exists in the peerstore.
|
|
||||||
// Returns a map of peer ids to SignedRoutingState records. If
|
|
||||||
// no routing state exists for a peer, their map entry will be nil.
|
|
||||||
SignedRoutingStates(peers ...peer.ID) map[peer.ID]*routing.SignedRoutingState
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// KeyBook tracks the keys of Peers.
|
// KeyBook tracks the keys of Peers.
|
||||||
|
Loading…
Reference in New Issue
Block a user