Merge pull request #11429 from filecoin-project/phi-fix-seedticket-bench

fix: bench: Set ticket and seed to a non-all zero value
This commit is contained in:
Phi-rjan 2023-11-20 12:10:09 +01:00 committed by GitHub
commit 59873c7dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -266,7 +266,10 @@ var simplePreCommit1 = &cli.Command{
ProofType: spt(sectorSize, cctx.Bool("synthetic")), ProofType: spt(sectorSize, cctx.Bool("synthetic")),
} }
var ticket [32]byte // all zero ticket := [32]byte{}
for i := range ticket {
ticket[i] = 1
}
pieces, err := ParsePieceInfos(cctx, 3) pieces, err := ParsePieceInfos(cctx, 3)
if err != nil { if err != nil {
@ -420,7 +423,12 @@ var simpleCommit1 = &cli.Command{
start := time.Now() start := time.Now()
var ticket, seed [32]byte // all zero ticket := [32]byte{}
seed := [32]byte{}
for i := range ticket {
ticket[i] = 1
seed[i] = 1
}
commd, err := cid.Parse(cctx.Args().Get(2)) commd, err := cid.Parse(cctx.Args().Get(2))
if err != nil { if err != nil {