|
|
@ -40,6 +40,7 @@ const ( |
|
|
|
func (node *Node) ReceiveGlobalMessage() { |
|
|
|
func (node *Node) ReceiveGlobalMessage() { |
|
|
|
ctx := context.Background() |
|
|
|
ctx := context.Background() |
|
|
|
for { |
|
|
|
for { |
|
|
|
|
|
|
|
// TODO ek – infinite loop; add shutdown/cleanup logic
|
|
|
|
if node.globalGroupReceiver == nil { |
|
|
|
if node.globalGroupReceiver == nil { |
|
|
|
time.Sleep(100 * time.Millisecond) |
|
|
|
time.Sleep(100 * time.Millisecond) |
|
|
|
continue |
|
|
|
continue |
|
|
@ -59,6 +60,7 @@ func (node *Node) ReceiveGlobalMessage() { |
|
|
|
// ReceiveGroupMessage use libp2p pubsub mechanism to receive broadcast messages
|
|
|
|
// ReceiveGroupMessage use libp2p pubsub mechanism to receive broadcast messages
|
|
|
|
func (node *Node) ReceiveGroupMessage() { |
|
|
|
func (node *Node) ReceiveGroupMessage() { |
|
|
|
ctx := context.Background() |
|
|
|
ctx := context.Background() |
|
|
|
|
|
|
|
// TODO ek – infinite loop; add shutdown/cleanup logic
|
|
|
|
for { |
|
|
|
for { |
|
|
|
if node.shardGroupReceiver == nil { |
|
|
|
if node.shardGroupReceiver == nil { |
|
|
|
time.Sleep(100 * time.Millisecond) |
|
|
|
time.Sleep(100 * time.Millisecond) |
|
|
@ -79,6 +81,7 @@ func (node *Node) ReceiveGroupMessage() { |
|
|
|
// ReceiveClientGroupMessage use libp2p pubsub mechanism to receive broadcast messages for client
|
|
|
|
// ReceiveClientGroupMessage use libp2p pubsub mechanism to receive broadcast messages for client
|
|
|
|
func (node *Node) ReceiveClientGroupMessage() { |
|
|
|
func (node *Node) ReceiveClientGroupMessage() { |
|
|
|
ctx := context.Background() |
|
|
|
ctx := context.Background() |
|
|
|
|
|
|
|
// TODO ek – infinite loop; add shutdown/cleanup logic
|
|
|
|
for { |
|
|
|
for { |
|
|
|
if node.clientReceiver == nil { |
|
|
|
if node.clientReceiver == nil { |
|
|
|
// check less frequent on client messages
|
|
|
|
// check less frequent on client messages
|
|
|
|