diff --git a/swarm/network/stream/snapshot_retrieval_test.go b/swarm/network/stream/snapshot_retrieval_test.go index 56b11bcd05..09d915d48d 100644 --- a/swarm/network/stream/snapshot_retrieval_test.go +++ b/swarm/network/stream/snapshot_retrieval_test.go @@ -220,9 +220,8 @@ func runFileRetrievalTest(nodeCount int) error { log.Warn("Retrieve error", "err", err, "hash", hash, "nodeId", id) time.Sleep(500 * time.Millisecond) continue REPEAT - } else { - log.Debug(fmt.Sprintf("File with root hash %x successfully retrieved", hash)) } + log.Debug(fmt.Sprintf("File with root hash %x successfully retrieved", hash)) } } return nil @@ -312,9 +311,8 @@ func runRetrievalTest(chunkCount int, nodeCount int) error { log.Warn("Retrieve error", "err", err, "hash", hash, "nodeId", id, "size", s) time.Sleep(500 * time.Millisecond) continue REPEAT - } else { - log.Debug(fmt.Sprintf("Chunk with root hash %x successfully retrieved", hash)) } + log.Debug(fmt.Sprintf("Chunk with root hash %x successfully retrieved", hash)) } } // all nodes and files found, exit loop and return without error diff --git a/swarm/network/stream/snapshot_sync_test.go b/swarm/network/stream/snapshot_sync_test.go index 594f971b4c..0d58494873 100644 --- a/swarm/network/stream/snapshot_sync_test.go +++ b/swarm/network/stream/snapshot_sync_test.go @@ -313,15 +313,14 @@ func runSim(conf *synctestConfig, ctx context.Context, sim *simulation.Simulatio // Do not get crazy with logging the warn message time.Sleep(500 * time.Millisecond) continue REPEAT - } else { - evt := &simulations.Event{ - Type: EventTypeChunkArrived, - Node: sim.Net.GetNode(id), - Data: chunk.String(), - } - sim.Net.Events().Send(evt) - log.Debug(fmt.Sprintf("Chunk %s IS FOUND for id %s", chunk, id)) } + evt := &simulations.Event{ + Type: EventTypeChunkArrived, + Node: sim.Net.GetNode(id), + Data: chunk.String(), + } + sim.Net.Events().Send(evt) + log.Debug(fmt.Sprintf("Chunk %s IS FOUND for id %s", chunk, id)) } } return nil @@ -515,9 +514,8 @@ func testSyncingViaDirectSubscribe(t *testing.T, chunkCount int, nodeCount int) // Do not get crazy with logging the warn message time.Sleep(500 * time.Millisecond) continue REPEAT - } else { - log.Debug(fmt.Sprintf("Chunk %s IS FOUND for id %s", chunk, id)) } + log.Debug(fmt.Sprintf("Chunk %s IS FOUND for id %s", chunk, id)) } } return nil