-
Notifications
You must be signed in to change notification settings - Fork 467
/
Copy pathtesting.go
34 lines (25 loc) · 954 Bytes
/
testing.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package ffiwrapper
import (
"context"
"github.com/filecoin-project/go-state-types/abi"
proof5 "github.com/filecoin-project/specs-actors/v5/actors/runtime/proof"
)
// FakeVerifier is a simple mock Verifier for testing.
type FakeVerifier struct {
}
var _ Verifier = (*FakeVerifier)(nil)
func (f *FakeVerifier) VerifySeal(proof5.SealVerifyInfo) (bool, error) {
return true, nil
}
func (f *FakeVerifier) VerifyAggregateSeals(aggregate proof5.AggregateSealVerifyProofAndInfos) (bool, error) {
return true, nil
}
func (f *FakeVerifier) VerifyWinningPoSt(context.Context, proof5.WinningPoStVerifyInfo) (bool, error) {
return true, nil
}
func (f *FakeVerifier) VerifyWindowPoSt(context.Context, proof5.WindowPoStVerifyInfo) (bool, error) {
return true, nil
}
func (f *FakeVerifier) GenerateWinningPoStSectorChallenge(context.Context, abi.RegisteredPoStProof, abi.ActorID, abi.PoStRandomness, uint64) ([]uint64, error) {
return []uint64{}, nil
}