Commit 77e3ef77 authored by 董子豪's avatar 董子豪

add test

parent 6dbececb
...@@ -796,16 +796,16 @@ func runSeals(sb *ffiwrapper.Sealer, sbfs *basicfs.Provider, numSectors int, par ...@@ -796,16 +796,16 @@ func runSeals(sb *ffiwrapper.Sealer, sbfs *basicfs.Provider, numSectors int, par
Proof: aggregateProof, Proof: aggregateProof,
}) })
if ok { if ok {
fmt.Println("Aggragate proof is true") fmt.Println("Aggregate proof is true")
} else{ } else{
fmt.Println("Aggragate proof is false") fmt.Println("Aggregate proof is false")
} }
verifyDone := time.Now() verifyDone := time.Now()
fmt.Println("--------------------------") fmt.Println("--------------------------")
fmt.Println("Aggragate Proofs size is %d", len(aggregateProof)) fmt.Println("Aggregate Proofs size is %d", len(aggregateProof))
fmt.Println("Aggragate Seal Proofs using %s", verifyAggregate.Sub(aggregateSeal)) fmt.Println("Aggregate Seal Proofs using %s", verifyAggregate.Sub(aggregateSeal))
fmt.Println("Verify Aggragate Seal Proofs using %s", verifyDone.Sub(verifyAggregate)) fmt.Println("Verify Aggregate Seal Proofs using %s", verifyDone.Sub(verifyAggregate))
fmt.Println("--------------------------") fmt.Println("--------------------------")
return sealTimings, sealedSectors, nil return sealTimings, sealedSectors, nil
......
...@@ -203,9 +203,9 @@ func AggregateWindowPoStProofs( ...@@ -203,9 +203,9 @@ func AggregateWindowPoStProofs(
if len(windowPoStProofs) != len(sectorCountArr) { if len(windowPoStProofs) != len(sectorCountArr) {
return nil, xerrors.Errorf("the lenth of windowPoStProofs and sectorCount is not match") return nil, xerrors.Errorf("the lenth of windowPoStProofs and sectorCount is not match")
} }
sectorCount := sectorCountArr[0] sectorCount := sectorCountArr[0]
for count := range(sectorCountArr) { for _, count := range(sectorCountArr) {
if sectorCount != count { if sectorCount != count {
return nil, xerrors.Errorf("Window PoSt challenge count must be equal") return nil, xerrors.Errorf("Window PoSt challenge count must be equal")
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment