Commit e3979676 authored by 董子豪's avatar 董子豪

Modified format

parent f015e2ea
......@@ -7,11 +7,11 @@ package ffi
// #include "./filcrypto.h"
import "C"
import (
"encoding/binary"
"math"
"os"
"runtime"
"unsafe"
"math"
"encoding/binary"
// "fmt"
commcid "github.com/filecoin-project/go-fil-commcid"
......@@ -20,8 +20,8 @@ import (
"github.com/pkg/errors"
"golang.org/x/xerrors"
"github.com/filecoin-project/filecoin-ffi/generated"
spproof "fil_integrate/build/proof"
"github.com/filecoin-project/filecoin-ffi/generated"
)
// VerifySeal returns true if the sealing operation from which its inputs were
......@@ -188,7 +188,7 @@ func VerifyWindowPoSt(info spproof.WindowPoStVerifyInfo) (bool, error) {
return resp.IsValid, nil
}
func VerifyAggregateWindowPostProofs(aggregateInfo spproof.AggregateWindowPostInfos)(bool, error) {
func VerifyAggregateWindowPostProofs(aggregateInfo spproof.AggregateWindowPostInfos) (bool, error) {
if len(aggregateInfo.ChallengedSectors) == 0 {
return false, xerrors.New("no seal verify infos")
}
......@@ -222,16 +222,16 @@ func VerifyAggregateWindowPostProofs(aggregateInfo spproof.AggregateWindowPostIn
}
resp := generated.FilVerifyAggregateWindowPoStProofs(
sp,
rap,
proverID,
aggregateInfo.AggregateProof.ProofBytes,
uint(len(aggregateInfo.AggregateProof.ProofBytes)),
randomnesses,
uint(len(randomnesses)),
filPublicReplicaInfos,
aggregateInfo.SectorCount,
uint(len(aggregateInfo.SectorCount)))
sp,
rap,
proverID,
aggregateInfo.AggregateProof.ProofBytes,
uint(len(aggregateInfo.AggregateProof.ProofBytes)),
randomnesses,
uint(len(randomnesses)),
filPublicReplicaInfos,
aggregateInfo.SectorCount,
uint(len(aggregateInfo.SectorCount)))
resp.Deref()
defer generated.FilDestroyVerifyAggregateSealResponse(resp)
......@@ -541,7 +541,6 @@ func SealCommitPhase2(
return copyBytes(resp.ProofPtr, resp.ProofLen), nil
}
// aggregateInfo{
// minerID,
// RegisteredSealProof || PoStProof,
......@@ -806,7 +805,7 @@ func AggregateWindowPoStProofs(aggregateInfo spproof.AggregateWindowPostInfos, p
}
return spproof.PoStProof{
PoStProof: aggregateInfo.PoStType,
PoStProof: aggregateInfo.PoStType,
ProofBytes: copyBytes(resp.ProofPtr, resp.ProofLen),
}, nil
......
......@@ -5,9 +5,9 @@ import (
"encoding/json"
"sort"
spproof "fil_integrate/build/proof"
"github.com/filecoin-project/go-state-types/abi"
"github.com/ipfs/go-cid"
spproof "fil_integrate/build/proof"
)
// BLS
......
......@@ -192,7 +192,7 @@ func DecodePiece(
}
type Sealer struct {
sectors SectorManager
sectors SectorManager
sortedPieces []storage.Piece
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment