Fix sectorbuilder.VerifySeal

This commit is contained in:
Łukasz Magiera 2019-10-31 20:03:26 +01:00
parent 34998d9362
commit ba937cf859
2 changed files with 7 additions and 4 deletions

View File

@ -42,7 +42,7 @@ type Provider struct {
askLk sync.Mutex
sminer *storage.Miner
full api.FullNode
full api.FullNode
// TODO: Use a custom protocol or graphsync in the future
// TODO: GC
@ -80,8 +80,8 @@ func NewProvider(ds dtypes.MetadataDS, sminer *storage.Miner, dag dtypes.Staging
h := &Provider{
sminer: sminer,
dag: dag,
full: fullNode,
dag: dag,
full: fullNode,
pricePerByteBlock: types.NewInt(3), // TODO: allow setting
minPieceSize: 1,

View File

@ -142,7 +142,10 @@ func VerifySeal(sectorSize uint64, commR, commD []byte, proverID address.Address
copy(seeda[:], seed)
proverIDa := addressToProverID(proverID)
return sectorbuilder.VerifySeal(sectorSize, commRa, commDa, proverIDa, ticketa, seeda, sectorID, proof, nil)
return sectorbuilder.VerifySeal(sectorSize, commRa, commDa, proverIDa, ticketa, seeda, sectorID, proof, []sectorbuilder.PublicPieceInfo{{
Size: UserBytesForSectorSize(sectorSize), // TODO: Provide the real piece size?
CommP: commDa,
}})
}
func NewSortedSectorInfo(sectors []SectorInfo) SortedSectorInfo {