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

Modified format

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