Pset represents the proving sectors, and Sset repensents all sectors

This commit is contained in:
shannon 2020-05-20 11:58:58 +08:00
parent cc44167f2c
commit cc5875c6bd

View File

@ -103,11 +103,11 @@ var infoCmd = &cli.Command{
fmt.Printf("\tProving: %s\n", types.SizeStr(types.BigMul(types.NewInt(secCounts.Pset), types.NewInt(uint64(mi.SectorSize))))) fmt.Printf("\tProving: %s\n", types.SizeStr(types.BigMul(types.NewInt(secCounts.Pset), types.NewInt(uint64(mi.SectorSize)))))
} else { } else {
var faultyPercentage float64 var faultyPercentage float64
if secCounts.Pset != 0 { if secCounts.Sset != 0 {
faultyPercentage = float64(10000*uint64(len(faults))/secCounts.Pset) / 100. faultyPercentage = float64(10000*uint64(len(faults))/secCounts.Sset) / 100.
} }
fmt.Printf("\tProving: %s (%s Faulty, %.2f%%)\n", fmt.Printf("\tProving: %s (%s Faulty, %.2f%%)\n",
types.SizeStr(types.BigMul(types.NewInt(secCounts.Pset-uint64(len(faults))), types.NewInt(uint64(mi.SectorSize)))), types.SizeStr(types.BigMul(types.NewInt(secCounts.Pset), types.NewInt(uint64(mi.SectorSize)))),
types.SizeStr(types.BigMul(types.NewInt(uint64(len(faults))), types.NewInt(uint64(mi.SectorSize)))), types.SizeStr(types.BigMul(types.NewInt(uint64(len(faults))), types.NewInt(uint64(mi.SectorSize)))),
faultyPercentage) faultyPercentage)
} }