whisper: use async handshakes to handle blocking peers

This commit is contained in:
Péter Szilágyi
2015-04-15 13:01:22 +03:00
parent 46ea193a49
commit 6ceb253f74
3 changed files with 12 additions and 47 deletions

View File

@ -21,7 +21,7 @@ func startTestCluster(n int) []*Whisper {
}
// Wire all the peers to the root one
for i := 1; i < n; i++ {
src, dst := bufMsgPipe()
src, dst := p2p.MsgPipe()
go whispers[0].handlePeer(nodes[i], src)
go whispers[i].handlePeer(nodes[0], dst)