提交 de4265fa 编写于 作者: J Javier Peletier 提交者: Viktor Trón

swarm/network/simulation:commented out unreachable code-avoid vet errors (#18263)

上级 90ea542e
...@@ -18,14 +18,8 @@ package simulation_test ...@@ -18,14 +18,8 @@ package simulation_test
import ( import (
"context" "context"
"fmt"
"sync"
"time"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/p2p/simulations/adapters"
"github.com/ethereum/go-ethereum/swarm/network"
"github.com/ethereum/go-ethereum/swarm/network/simulation" "github.com/ethereum/go-ethereum/swarm/network/simulation"
) )
...@@ -35,7 +29,8 @@ import ( ...@@ -35,7 +29,8 @@ import (
func ExampleSimulation_WaitTillHealthy() { func ExampleSimulation_WaitTillHealthy() {
log.Error("temporarily disabled as simulations.WaitTillHealthy cannot be trusted") log.Error("temporarily disabled as simulations.WaitTillHealthy cannot be trusted")
return
/* Commented out to avoid go vet errors/warnings
sim := simulation.New(map[string]simulation.ServiceFunc{ sim := simulation.New(map[string]simulation.ServiceFunc{
"bzz": func(ctx *adapters.ServiceContext, b *sync.Map) (node.Service, func(), error) { "bzz": func(ctx *adapters.ServiceContext, b *sync.Map) (node.Service, func(), error) {
...@@ -75,6 +70,8 @@ func ExampleSimulation_WaitTillHealthy() { ...@@ -75,6 +70,8 @@ func ExampleSimulation_WaitTillHealthy() {
} }
// continue with the test // continue with the test
*/
} }
// Watch all peer events in the simulation network, buy receiving from a channel. // Watch all peer events in the simulation network, buy receiving from a channel.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册