mirror of
https://github.com/vacp2p/mvds.git
synced 2026-01-09 12:07:55 -05:00
fixes
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||

|
||||
[](https://godoc.org/github.com/status-im/mvds)
|
||||
)](https://godoc.org/github.com/status-im/mvds) [](https://goreportcard.com/report/github.com/status-im/mvds)
|
||||
|
||||
Experimental implementation of the [minimal viable data sync protocol specification](https://notes.status.im/bZHk_BNkSAe8-TY7DxdNEg?view).
|
||||
|
||||
|
||||
@@ -143,6 +143,7 @@ func (n *Node) AddPeer(group state.GroupID, id state.PeerID) {
|
||||
n.peers[group] = append(n.peers[group], id)
|
||||
}
|
||||
|
||||
// IsPeerInGroup checks whether a peer is in the specified group
|
||||
func (n Node) IsPeerInGroup(g state.GroupID, p state.PeerID) bool {
|
||||
for _, peer := range n.peers[g] {
|
||||
if bytes.Equal(peer[:], p[:]) {
|
||||
|
||||
@@ -12,6 +12,6 @@ type Packet struct {
|
||||
}
|
||||
|
||||
type Transport interface {
|
||||
Watch() Packet // @todo might need be changed in the future
|
||||
Watch() Packet
|
||||
Send(group state.GroupID, sender state.PeerID, peer state.PeerID, payload protobuf.Payload) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user