don't send messages to self
This commit is contained in:
parent
31c7dd38b8
commit
6cfbf2c124
|
@ -69,6 +69,7 @@ proc rpcHandler(f: FloodSub,
|
|||
|
||||
# send subscriptions to every peer
|
||||
for p in f.peers.values:
|
||||
# if p.id != peer.id:
|
||||
await p.send(@[RPCMsg(subscriptions: m.subscriptions)])
|
||||
|
||||
var toSendPeers: HashSet[string] = initSet[string]()
|
||||
|
@ -82,6 +83,7 @@ proc rpcHandler(f: FloodSub,
|
|||
|
||||
# forward the message to all peers interested in it
|
||||
for p in toSendPeers:
|
||||
if f.peers[p].id != peer.id:
|
||||
await f.peers[p].send(@[RPCMsg(messages: m.messages)])
|
||||
|
||||
proc handleConn(f: FloodSub,
|
||||
|
|
Loading…
Reference in New Issue