aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/network/simulation/node_test.go
diff options
context:
space:
mode:
authorFerenc Szabo <frncmx@gmail.com>2019-01-11 17:23:45 +0800
committerFelix Lange <fjl@users.noreply.github.com>2019-01-11 17:23:45 +0800
commit2eb838ed9776c9c3ec922e1116a5d50babda31c5 (patch)
tree1ad75862e2c0e7bcff2ec898c1f757c58eaaa650 /swarm/network/simulation/node_test.go
parent38cce9ac333d674616047be14c270d7cfbd43641 (diff)
downloadgo-tangerine-2eb838ed9776c9c3ec922e1116a5d50babda31c5.tar
go-tangerine-2eb838ed9776c9c3ec922e1116a5d50babda31c5.tar.gz
go-tangerine-2eb838ed9776c9c3ec922e1116a5d50babda31c5.tar.bz2
go-tangerine-2eb838ed9776c9c3ec922e1116a5d50babda31c5.tar.lz
go-tangerine-2eb838ed9776c9c3ec922e1116a5d50babda31c5.tar.xz
go-tangerine-2eb838ed9776c9c3ec922e1116a5d50babda31c5.tar.zst
go-tangerine-2eb838ed9776c9c3ec922e1116a5d50babda31c5.zip
p2p/simulations: eliminate concept of pivot (#18426)
Diffstat (limited to 'swarm/network/simulation/node_test.go')
-rw-r--r--swarm/network/simulation/node_test.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/swarm/network/simulation/node_test.go b/swarm/network/simulation/node_test.go
index 8da32cf37..dc9189c91 100644
--- a/swarm/network/simulation/node_test.go
+++ b/swarm/network/simulation/node_test.go
@@ -314,45 +314,6 @@ func TestUploadSnapshot(t *testing.T) {
log.Debug("Done.")
}
-func TestPivotNode(t *testing.T) {
- sim := New(noopServiceFuncMap)
- defer sim.Close()
-
- id, err := sim.AddNode()
- if err != nil {
- t.Fatal(err)
- }
-
- id2, err := sim.AddNode()
- if err != nil {
- t.Fatal(err)
- }
-
- if sim.PivotNodeID() != nil {
- t.Error("expected no pivot node")
- }
-
- sim.SetPivotNode(id)
-
- pid := sim.PivotNodeID()
-
- if pid == nil {
- t.Error("pivot node not set")
- } else if *pid != id {
- t.Errorf("expected pivot node %s, got %s", id, *pid)
- }
-
- sim.SetPivotNode(id2)
-
- pid = sim.PivotNodeID()
-
- if pid == nil {
- t.Error("pivot node not set")
- } else if *pid != id2 {
- t.Errorf("expected pivot node %s, got %s", id2, *pid)
- }
-}
-
func TestStartStopNode(t *testing.T) {
sim := New(noopServiceFuncMap)
defer sim.Close()