This commit is contained in:
decanus
2019-06-13 13:26:19 -04:00
parent e3549df1e9
commit 665a6dbec3
3 changed files with 3 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
![Version](https://img.shields.io/github/tag/status-im/mvds.svg)
[![API Reference](
https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667
)](https://godoc.org/github.com/status-im/mvds)
)](https://godoc.org/github.com/status-im/mvds) [![Go Report Card](https://goreportcard.com/badge/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).

View File

@@ -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[:]) {

View File

@@ -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
}