mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/network/stream: more debug output
This commit is contained in:
parent
6b20d6a44b
commit
19053c3be0
1 changed files with 8 additions and 2 deletions
|
|
@ -115,7 +115,7 @@ var retrievalSimServiceMap = map[string]simulation.ServiceFunc{
|
||||||
|
|
||||||
syncUpdateDelay := 1 * time.Second
|
syncUpdateDelay := 1 * time.Second
|
||||||
if *longrunning {
|
if *longrunning {
|
||||||
syncUpdateDelay = 15 * time.Second
|
syncUpdateDelay = 5 * time.Second
|
||||||
}
|
}
|
||||||
|
|
||||||
r := NewRegistry(addr.ID(), delivery, netStore, state.NewInmemoryStore(), &RegistryOptions{
|
r := NewRegistry(addr.ID(), delivery, netStore, state.NewInmemoryStore(), &RegistryOptions{
|
||||||
|
|
@ -145,7 +145,7 @@ func runFileRetrievalTest(nodeCount int) error {
|
||||||
sim := simulation.New(retrievalSimServiceMap)
|
sim := simulation.New(retrievalSimServiceMap)
|
||||||
defer sim.Close()
|
defer sim.Close()
|
||||||
|
|
||||||
log.Info("Initializing test config")
|
log.Info("Initializing test config", "node count", nodeCount)
|
||||||
|
|
||||||
conf := &synctestConfig{}
|
conf := &synctestConfig{}
|
||||||
//map of discover ID to indexes of chunks expected at that ID
|
//map of discover ID to indexes of chunks expected at that ID
|
||||||
|
|
@ -163,6 +163,8 @@ func runFileRetrievalTest(nodeCount int) error {
|
||||||
ctx, cancelSimRun := context.WithTimeout(context.Background(), 3*time.Minute)
|
ctx, cancelSimRun := context.WithTimeout(context.Background(), 3*time.Minute)
|
||||||
defer cancelSimRun()
|
defer cancelSimRun()
|
||||||
|
|
||||||
|
log.Info("Starting simulation")
|
||||||
|
|
||||||
result := sim.Run(ctx, func(ctx context.Context, sim *simulation.Simulation) error {
|
result := sim.Run(ctx, func(ctx context.Context, sim *simulation.Simulation) error {
|
||||||
nodeIDs := sim.UpNodeIDs()
|
nodeIDs := sim.UpNodeIDs()
|
||||||
for _, n := range nodeIDs {
|
for _, n := range nodeIDs {
|
||||||
|
|
@ -190,6 +192,8 @@ func runFileRetrievalTest(nodeCount int) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Info("network healthy, start file checks")
|
||||||
|
|
||||||
// File retrieval check is repeated until all uploaded files are retrieved from all nodes
|
// File retrieval check is repeated until all uploaded files are retrieved from all nodes
|
||||||
// or until the timeout is reached.
|
// or until the timeout is reached.
|
||||||
REPEAT:
|
REPEAT:
|
||||||
|
|
@ -217,6 +221,8 @@ func runFileRetrievalTest(nodeCount int) error {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
log.Info("Simulation terminated")
|
||||||
|
|
||||||
if result.Error != nil {
|
if result.Error != nil {
|
||||||
return result.Error
|
return result.Error
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue