mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
add input seed
This commit is contained in:
parent
a22e56974f
commit
d972357ca1
2 changed files with 12 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ var (
|
|||
allhosts string
|
||||
hosts []string
|
||||
filesize int
|
||||
inputSeed int
|
||||
syncDelay int
|
||||
httpPort int
|
||||
wsPort int
|
||||
|
|
@ -74,6 +75,12 @@ func main() {
|
|||
Usage: "ws port",
|
||||
Destination: &wsPort,
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "seed",
|
||||
Value: 0,
|
||||
Usage: "input seed in case we need deterministic upload",
|
||||
Destination: &inputSeed,
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "filesize",
|
||||
Value: 1024,
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@ import (
|
|||
)
|
||||
|
||||
func uploadAndSyncCmd(ctx *cli.Context, tuid string) error {
|
||||
// use input seed if it has been set
|
||||
if inputSeed != 0 {
|
||||
seed = inputSeed
|
||||
}
|
||||
|
||||
randomBytes := testutil.RandomBytes(seed, filesize*1000)
|
||||
|
||||
errc := make(chan error)
|
||||
|
|
|
|||
Loading…
Reference in a new issue