mirror of
https://github.com/vacp2p/mvds.git
synced 2026-01-09 12:07:55 -05:00
enhancement/node-stopping (#46)
* made node stoppable * updated * added todo * comments * remove/ecsda (#50)
This commit is contained in:
@@ -37,6 +37,8 @@ func (t *ChannelTransport) Watch() Packet {
|
||||
}
|
||||
|
||||
func (t *ChannelTransport) Send(group state.GroupID, sender state.PeerID, peer state.PeerID, payload protobuf.Payload) error {
|
||||
// @todo we can do this better, we put node onlineness into a goroutine where we just stop the nodes for x seconds
|
||||
// outside of this class
|
||||
math.Seed(time.Now().UnixNano())
|
||||
if math.Intn(100) < t.offline {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user