mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/swarm/swarm-smoke: renamed track-timeout and track-chunks
This commit is contained in:
parent
dcdff86b8e
commit
71382131df
2 changed files with 15 additions and 15 deletions
|
|
@ -37,16 +37,16 @@ var (
|
|||
)
|
||||
|
||||
var (
|
||||
allhosts string
|
||||
hosts []string
|
||||
filesize int
|
||||
syncDelay int
|
||||
httpPort int
|
||||
wsPort int
|
||||
verbosity int
|
||||
timeout int
|
||||
single bool
|
||||
getAllRefsTimeout int
|
||||
allhosts string
|
||||
hosts []string
|
||||
filesize int
|
||||
syncDelay int
|
||||
httpPort int
|
||||
wsPort int
|
||||
verbosity int
|
||||
timeout int
|
||||
single bool
|
||||
trackTimeout int
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
@ -104,10 +104,10 @@ func main() {
|
|||
Destination: &single,
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "refs-timeout",
|
||||
Name: "track-timeout",
|
||||
Value: 5,
|
||||
Usage: "timeout in seconds to wait for GetAllReferences to return",
|
||||
Destination: &getAllRefsTimeout,
|
||||
Destination: &trackTimeout,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ func uploadAndSyncCmd(ctx *cli.Context, tuid string) error {
|
|||
|
||||
e := fmt.Errorf("timeout after %v sec", timeout)
|
||||
// trigger debug functionality on randomBytes
|
||||
err := triggerChunkDebug(randomBytes[:])
|
||||
err := trackChunks(randomBytes[:])
|
||||
if err != nil {
|
||||
e = fmt.Errorf("%v; triggerChunkDebug failed: %v", e, err)
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@ func uploadAndSyncCmd(ctx *cli.Context, tuid string) error {
|
|||
}
|
||||
}
|
||||
|
||||
func triggerChunkDebug(testData []byte) error {
|
||||
func trackChunks(testData []byte) error {
|
||||
log.Warn("Test timed out; running chunk debug sequence")
|
||||
|
||||
addrs, err := getAllRefs(testData)
|
||||
|
|
@ -117,7 +117,7 @@ func getAllRefs(testData []byte) (storage.AddressCollection, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(getAllRefsTimeout)*time.Second)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(trackTimeout)*time.Second)
|
||||
defer cancel()
|
||||
|
||||
reader := bytes.NewReader(testData)
|
||||
|
|
|
|||
Loading…
Reference in a new issue