mock sealer: Simulate randomness sideeffects
This commit is contained in:
parent
06aaa668d6
commit
d9923125ff
2
extern/sector-storage/mock/mock.go
vendored
2
extern/sector-storage/mock/mock.go
vendored
@ -325,6 +325,8 @@ func (mgr *SectorMgr) GenerateWindowPoSt(ctx context.Context, minerID abi.ActorI
|
|||||||
}
|
}
|
||||||
|
|
||||||
func generateFakePoStProof(sectorInfo []proof2.SectorInfo, randomness abi.PoStRandomness) []byte {
|
func generateFakePoStProof(sectorInfo []proof2.SectorInfo, randomness abi.PoStRandomness) []byte {
|
||||||
|
randomness[31] &= 0x3f
|
||||||
|
|
||||||
hasher := sha256.New()
|
hasher := sha256.New()
|
||||||
_, _ = hasher.Write(randomness)
|
_, _ = hasher.Write(randomness)
|
||||||
for _, info := range sectorInfo {
|
for _, info := range sectorInfo {
|
||||||
|
Loading…
Reference in New Issue
Block a user