Merge pull request #710 from filecoin-project/fix/post-challenge-count-check

there is no real correlation between challenge count and len(winners)
This commit is contained in:
Łukasz Magiera 2019-12-05 13:14:09 +01:00 committed by GitHub
commit 04f33a2bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,11 +46,6 @@ func VerifyFallbackPost(ctx context.Context, sectorSize uint64, sectorInfo Sorte
}
func verifyPost(ctx context.Context, sectorSize uint64, sectorInfo SortedPublicSectorInfo, challengeCount uint64, challengeSeed []byte, proof []byte, candidates []EPostCandidate, proverID address.Address) (bool, error) {
if challengeCount != uint64(len(candidates)) {
log.Warnf("verifyPost with wrong candidate count: expected %d, got %d", challengeCount, len(candidates))
return false, nil // user input, dont't error
}
var challengeSeeda [CommLen]byte
copy(challengeSeeda[:], challengeSeed)