mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
swarm/network/stream: address PR comments
This commit is contained in:
parent
d1457c7b3c
commit
11948b04ea
2 changed files with 10 additions and 14 deletions
|
|
@ -220,9 +220,8 @@ func runFileRetrievalTest(nodeCount int) error {
|
||||||
log.Warn("Retrieve error", "err", err, "hash", hash, "nodeId", id)
|
log.Warn("Retrieve error", "err", err, "hash", hash, "nodeId", id)
|
||||||
time.Sleep(500 * time.Millisecond)
|
time.Sleep(500 * time.Millisecond)
|
||||||
continue REPEAT
|
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
|
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)
|
log.Warn("Retrieve error", "err", err, "hash", hash, "nodeId", id, "size", s)
|
||||||
time.Sleep(500 * time.Millisecond)
|
time.Sleep(500 * time.Millisecond)
|
||||||
continue REPEAT
|
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
|
// all nodes and files found, exit loop and return without error
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,7 @@ func runSim(conf *synctestConfig, ctx context.Context, sim *simulation.Simulatio
|
||||||
// Do not get crazy with logging the warn message
|
// Do not get crazy with logging the warn message
|
||||||
time.Sleep(500 * time.Millisecond)
|
time.Sleep(500 * time.Millisecond)
|
||||||
continue REPEAT
|
continue REPEAT
|
||||||
} else {
|
}
|
||||||
evt := &simulations.Event{
|
evt := &simulations.Event{
|
||||||
Type: EventTypeChunkArrived,
|
Type: EventTypeChunkArrived,
|
||||||
Node: sim.Net.GetNode(id),
|
Node: sim.Net.GetNode(id),
|
||||||
|
|
@ -323,7 +323,6 @@ func runSim(conf *synctestConfig, ctx context.Context, sim *simulation.Simulatio
|
||||||
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
|
return nil
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -515,9 +514,8 @@ func testSyncingViaDirectSubscribe(t *testing.T, chunkCount int, nodeCount int)
|
||||||
// Do not get crazy with logging the warn message
|
// Do not get crazy with logging the warn message
|
||||||
time.Sleep(500 * time.Millisecond)
|
time.Sleep(500 * time.Millisecond)
|
||||||
continue REPEAT
|
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
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue