make it all build finally
This commit is contained in:
@@ -29,7 +29,7 @@ type EPostTicket struct {
|
||||
}
|
||||
|
||||
type EPostProof struct {
|
||||
Proof []byte
|
||||
Proofs []abi.PoStProof
|
||||
PostRand []byte
|
||||
Candidates []EPostTicket
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/filecoin-project/go-address"
|
||||
"github.com/filecoin-project/specs-actors/actors/abi"
|
||||
"github.com/filecoin-project/specs-actors/actors/crypto"
|
||||
cid "github.com/ipfs/go-cid"
|
||||
)
|
||||
@@ -27,7 +28,7 @@ func testBlockHeader(t testing.TB) *BlockHeader {
|
||||
return &BlockHeader{
|
||||
Miner: addr,
|
||||
EPostProof: EPostProof{
|
||||
Proof: []byte("pruuf"),
|
||||
Proofs: []abi.PoStProof{{ProofBytes: []byte("pruuf")}},
|
||||
PostRand: []byte("random"),
|
||||
},
|
||||
Ticket: &Ticket{
|
||||
|
||||
@@ -392,16 +392,6 @@ func (t *EPostProof) MarshalCBOR(w io.Writer) error {
|
||||
}
|
||||
|
||||
// t.Proof ([]uint8) (slice)
|
||||
if len(t.Proof) > cbg.ByteArrayMaxLen {
|
||||
return xerrors.Errorf("Byte array in field t.Proof was too long")
|
||||
}
|
||||
|
||||
if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajByteString, uint64(len(t.Proof)))); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := w.Write(t.Proof); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// t.PostRand ([]uint8) (slice)
|
||||
if len(t.PostRand) > cbg.ByteArrayMaxLen {
|
||||
@@ -459,10 +449,6 @@ func (t *EPostProof) UnmarshalCBOR(r io.Reader) error {
|
||||
if maj != cbg.MajByteString {
|
||||
return fmt.Errorf("expected byte array")
|
||||
}
|
||||
t.Proof = make([]byte, extra)
|
||||
if _, err := io.ReadFull(br, t.Proof); err != nil {
|
||||
return err
|
||||
}
|
||||
// t.PostRand ([]uint8) (slice)
|
||||
|
||||
maj, extra, err = cbg.CborReadHeader(br)
|
||||
|
||||
@@ -61,7 +61,7 @@ func MkBlock(parents *types.TipSet, weightInc uint64, ticketNonce uint64) *types
|
||||
return &types.BlockHeader{
|
||||
Miner: addr,
|
||||
EPostProof: types.EPostProof{
|
||||
Proof: []byte("election post proof proof"),
|
||||
Proofs: []abi.PoStProof{{ProofBytes: []byte("election post proof proof")}},
|
||||
},
|
||||
Ticket: &types.Ticket{
|
||||
VRFProof: []byte(fmt.Sprintf("====%d=====", ticketNonce)),
|
||||
|
||||
Reference in New Issue
Block a user