Fix sectorbuilder.VerifySeal
This commit is contained in:
parent
34998d9362
commit
ba937cf859
@ -42,7 +42,7 @@ type Provider struct {
|
|||||||
askLk sync.Mutex
|
askLk sync.Mutex
|
||||||
|
|
||||||
sminer *storage.Miner
|
sminer *storage.Miner
|
||||||
full api.FullNode
|
full api.FullNode
|
||||||
|
|
||||||
// TODO: Use a custom protocol or graphsync in the future
|
// TODO: Use a custom protocol or graphsync in the future
|
||||||
// TODO: GC
|
// TODO: GC
|
||||||
@ -80,8 +80,8 @@ func NewProvider(ds dtypes.MetadataDS, sminer *storage.Miner, dag dtypes.Staging
|
|||||||
|
|
||||||
h := &Provider{
|
h := &Provider{
|
||||||
sminer: sminer,
|
sminer: sminer,
|
||||||
dag: dag,
|
dag: dag,
|
||||||
full: fullNode,
|
full: fullNode,
|
||||||
|
|
||||||
pricePerByteBlock: types.NewInt(3), // TODO: allow setting
|
pricePerByteBlock: types.NewInt(3), // TODO: allow setting
|
||||||
minPieceSize: 1,
|
minPieceSize: 1,
|
||||||
|
@ -142,7 +142,10 @@ func VerifySeal(sectorSize uint64, commR, commD []byte, proverID address.Address
|
|||||||
copy(seeda[:], seed)
|
copy(seeda[:], seed)
|
||||||
proverIDa := addressToProverID(proverID)
|
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 {
|
func NewSortedSectorInfo(sectors []SectorInfo) SortedSectorInfo {
|
||||||
|
Loading…
Reference in New Issue
Block a user