diff options
author | Janoš Guljaš <janos@users.noreply.github.com> | 2018-11-16 04:06:27 +0800 |
---|---|---|
committer | Viktor Trón <viktor.tron@gmail.com> | 2018-11-16 04:06:27 +0800 |
commit | 324027640bcaf137b8c9e96bc26f0833711497af (patch) | |
tree | 5d0dba8509addd3ac1a5c93469ebf2c6c6285086 /swarm/network/stream/delivery_test.go | |
parent | b91766fe6db6e484f2fd75f617307a48ff85600e (diff) | |
download | dexon-324027640bcaf137b8c9e96bc26f0833711497af.tar dexon-324027640bcaf137b8c9e96bc26f0833711497af.tar.gz dexon-324027640bcaf137b8c9e96bc26f0833711497af.tar.bz2 dexon-324027640bcaf137b8c9e96bc26f0833711497af.tar.lz dexon-324027640bcaf137b8c9e96bc26f0833711497af.tar.xz dexon-324027640bcaf137b8c9e96bc26f0833711497af.tar.zst dexon-324027640bcaf137b8c9e96bc26f0833711497af.zip |
swarm/network/simulation: use simulations.Event instead p2p.PeerEvent (#18098)
Diffstat (limited to 'swarm/network/stream/delivery_test.go')
-rw-r--r-- | swarm/network/stream/delivery_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/swarm/network/stream/delivery_test.go b/swarm/network/stream/delivery_test.go index c9a530115..6b6025115 100644 --- a/swarm/network/stream/delivery_test.go +++ b/swarm/network/stream/delivery_test.go @@ -565,13 +565,13 @@ func testDeliveryFromNodes(t *testing.T, nodes, conns, chunkCount int, skipCheck disconnections := sim.PeerEvents( context.Background(), sim.NodeIDs(), - simulation.NewPeerEventsFilter().Type(p2p.PeerEventTypeDrop), + simulation.NewPeerEventsFilter().Drop(), ) go func() { for d := range disconnections { if d.Error != nil { - log.Error("peer drop", "node", d.NodeID, "peer", d.Event.Peer) + log.Error("peer drop", "node", d.NodeID, "peer", d.PeerID) t.Fatal(d.Error) } } @@ -697,13 +697,13 @@ func benchmarkDeliveryFromNodes(b *testing.B, nodes, conns, chunkCount int, skip disconnections := sim.PeerEvents( context.Background(), sim.NodeIDs(), - simulation.NewPeerEventsFilter().Type(p2p.PeerEventTypeDrop), + simulation.NewPeerEventsFilter().Drop(), ) go func() { for d := range disconnections { if d.Error != nil { - log.Error("peer drop", "node", d.NodeID, "peer", d.Event.Peer) + log.Error("peer drop", "node", d.NodeID, "peer", d.PeerID) b.Fatal(d.Error) } } |