diff --git a/discovery/migrations/migrations_cbor_gen.go b/discovery/migrations/migrations_cbor_gen.go index e0583b80..5452853d 100644 --- a/discovery/migrations/migrations_cbor_gen.go +++ b/discovery/migrations/migrations_cbor_gen.go @@ -5,13 +5,17 @@ package migrations import ( "fmt" "io" + "sort" migrations "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" + cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf +var _ = cid.Undef +var _ = sort.Sort var lengthBufRetrievalPeers0 = []byte{129} diff --git a/discovery/types_cbor_gen.go b/discovery/types_cbor_gen.go index 18dafec2..7616880e 100644 --- a/discovery/types_cbor_gen.go +++ b/discovery/types_cbor_gen.go @@ -5,13 +5,17 @@ package discovery import ( "fmt" "io" + "sort" retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket" + cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf +var _ = cid.Undef +var _ = sort.Sort func (t *RetrievalPeers) MarshalCBOR(w io.Writer) error { if t == nil { @@ -115,7 +119,8 @@ func (t *RetrievalPeers) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } diff --git a/go.mod b/go.mod index 5687f965..04f17268 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( github.com/multiformats/go-multiaddr v0.3.1 github.com/multiformats/go-multibase v0.0.3 github.com/stretchr/testify v1.6.1 - github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163 + github.com/whyrusleeping/cbor-gen v0.0.0-20210219115102-f37d292932f2 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd golang.org/x/net v0.0.0-20200625001655-4c5254603344 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 diff --git a/go.sum b/go.sum index 4bd60739..b036ad4f 100644 --- a/go.sum +++ b/go.sum @@ -902,6 +902,8 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163 h1:TtcUeY2XZSriVWR1pXyfCBWIf/NGC2iUdNw1lofUjUU= github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20210219115102-f37d292932f2 h1:bsUlNhdmbtlfdLVXAVfuvKQ01RnWAM09TVrJkI7NZs4= +github.com/whyrusleeping/cbor-gen v0.0.0-20210219115102-f37d292932f2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= diff --git a/piecestore/migrations/migrations_cbor_gen.go b/piecestore/migrations/migrations_cbor_gen.go index e981126c..9d04c142 100644 --- a/piecestore/migrations/migrations_cbor_gen.go +++ b/piecestore/migrations/migrations_cbor_gen.go @@ -5,13 +5,17 @@ package migrations import ( "fmt" "io" + "sort" abi "github.com/filecoin-project/go-state-types/abi" + cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf +var _ = cid.Undef +var _ = sort.Sort var lengthBufPieceInfo0 = []byte{130} diff --git a/piecestore/types_cbor_gen.go b/piecestore/types_cbor_gen.go index f01eaf02..44e82f95 100644 --- a/piecestore/types_cbor_gen.go +++ b/piecestore/types_cbor_gen.go @@ -5,13 +5,17 @@ package piecestore import ( "fmt" "io" + "sort" abi "github.com/filecoin-project/go-state-types/abi" + cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf +var _ = cid.Undef +var _ = sort.Sort func (t *PieceInfo) MarshalCBOR(w io.Writer) error { if t == nil { @@ -144,7 +148,8 @@ func (t *PieceInfo) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -323,7 +328,8 @@ func (t *DealInfo) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -440,7 +446,8 @@ func (t *BlockLocation) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -550,7 +557,8 @@ func (t *PieceBlockLocation) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -687,7 +695,8 @@ func (t *CIDInfo) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } diff --git a/retrievalmarket/migrations/migrations_cbor_gen.go b/retrievalmarket/migrations/migrations_cbor_gen.go index ed6ae625..b2adab08 100644 --- a/retrievalmarket/migrations/migrations_cbor_gen.go +++ b/retrievalmarket/migrations/migrations_cbor_gen.go @@ -5,17 +5,21 @@ package migrations import ( "fmt" "io" + "sort" migrations "github.com/filecoin-project/go-fil-markets/piecestore/migrations" retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket" multistore "github.com/filecoin-project/go-multistore" paych "github.com/filecoin-project/specs-actors/actors/builtin/paych" + cid "github.com/ipfs/go-cid" peer "github.com/libp2p/go-libp2p-core/peer" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf +var _ = cid.Undef +var _ = sort.Sort var lengthBufQuery0 = []byte{130} diff --git a/retrievalmarket/types_cbor_gen.go b/retrievalmarket/types_cbor_gen.go index 8413261a..18506d6c 100644 --- a/retrievalmarket/types_cbor_gen.go +++ b/retrievalmarket/types_cbor_gen.go @@ -5,16 +5,20 @@ package retrievalmarket import ( "fmt" "io" + "sort" piecestore "github.com/filecoin-project/go-fil-markets/piecestore" multistore "github.com/filecoin-project/go-multistore" paych "github.com/filecoin-project/specs-actors/actors/builtin/paych" + cid "github.com/ipfs/go-cid" peer "github.com/libp2p/go-libp2p-core/peer" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf +var _ = cid.Undef +var _ = sort.Sort func (t *Query) MarshalCBOR(w io.Writer) error { if t == nil { @@ -119,7 +123,8 @@ func (t *Query) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -440,7 +445,8 @@ func (t *QueryResponse) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -580,7 +586,8 @@ func (t *DealProposal) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -756,7 +763,8 @@ func (t *DealResponse) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -996,7 +1004,8 @@ func (t *Params) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -1096,7 +1105,8 @@ func (t *QueryParams) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -1243,7 +1253,8 @@ func (t *DealPayment) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -1953,7 +1964,8 @@ func (t *ClientDealState) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -2347,7 +2359,8 @@ func (t *ProviderDealState) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -2459,7 +2472,8 @@ func (t *PaymentInfo) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -2619,7 +2633,8 @@ func (t *RetrievalPeer) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -2788,7 +2803,8 @@ func (t *Ask) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } diff --git a/storagemarket/impl/blockrecorder/blockrecorder_cbor_gen.go b/storagemarket/impl/blockrecorder/blockrecorder_cbor_gen.go index 6fe620eb..9b15d8e2 100644 --- a/storagemarket/impl/blockrecorder/blockrecorder_cbor_gen.go +++ b/storagemarket/impl/blockrecorder/blockrecorder_cbor_gen.go @@ -5,12 +5,16 @@ package blockrecorder import ( "fmt" "io" + "sort" + cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf +var _ = cid.Undef +var _ = sort.Sort var lengthBufPieceBlockMetadata = []byte{131} diff --git a/storagemarket/impl/requestvalidation/types_cbor_gen.go b/storagemarket/impl/requestvalidation/types_cbor_gen.go index d952f221..152f1702 100644 --- a/storagemarket/impl/requestvalidation/types_cbor_gen.go +++ b/storagemarket/impl/requestvalidation/types_cbor_gen.go @@ -5,12 +5,16 @@ package requestvalidation import ( "fmt" "io" + "sort" + cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf +var _ = cid.Undef +var _ = sort.Sort var lengthBufStorageDataTransferVoucher = []byte{129} diff --git a/storagemarket/migrations/migrations_cbor_gen.go b/storagemarket/migrations/migrations_cbor_gen.go index f5e95a79..73d0d669 100644 --- a/storagemarket/migrations/migrations_cbor_gen.go +++ b/storagemarket/migrations/migrations_cbor_gen.go @@ -5,18 +5,22 @@ package migrations import ( "fmt" "io" + "sort" filestore "github.com/filecoin-project/go-fil-markets/filestore" multistore "github.com/filecoin-project/go-multistore" abi "github.com/filecoin-project/go-state-types/abi" crypto "github.com/filecoin-project/go-state-types/crypto" market "github.com/filecoin-project/specs-actors/actors/builtin/market" + cid "github.com/ipfs/go-cid" peer "github.com/libp2p/go-libp2p-core/peer" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf +var _ = cid.Undef +var _ = sort.Sort var lengthBufClientDeal0 = []byte{145} diff --git a/storagemarket/network/types_cbor_gen.go b/storagemarket/network/types_cbor_gen.go index bd43211a..69cedc89 100644 --- a/storagemarket/network/types_cbor_gen.go +++ b/storagemarket/network/types_cbor_gen.go @@ -5,15 +5,19 @@ package network import ( "fmt" "io" + "sort" storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket" crypto "github.com/filecoin-project/go-state-types/crypto" market "github.com/filecoin-project/specs-actors/actors/builtin/market" + cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf +var _ = cid.Undef +var _ = sort.Sort func (t *AskRequest) MarshalCBOR(w io.Writer) error { if t == nil { @@ -89,7 +93,8 @@ func (t *AskRequest) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -179,7 +184,8 @@ func (t *AskResponse) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -339,7 +345,8 @@ func (t *Proposal) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -533,7 +540,8 @@ func (t *Response) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -649,7 +657,8 @@ func (t *SignedResponse) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -758,7 +767,8 @@ func (t *DealStatusRequest) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -864,7 +874,8 @@ func (t *DealStatusResponse) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } diff --git a/storagemarket/types_cbor_gen.go b/storagemarket/types_cbor_gen.go index f9f4c29b..7181ce1f 100644 --- a/storagemarket/types_cbor_gen.go +++ b/storagemarket/types_cbor_gen.go @@ -5,6 +5,7 @@ package storagemarket import ( "fmt" "io" + "sort" datatransfer "github.com/filecoin-project/go-data-transfer" filestore "github.com/filecoin-project/go-fil-markets/filestore" @@ -12,12 +13,15 @@ import ( abi "github.com/filecoin-project/go-state-types/abi" crypto "github.com/filecoin-project/go-state-types/crypto" market "github.com/filecoin-project/specs-actors/actors/builtin/market" + cid "github.com/ipfs/go-cid" peer "github.com/libp2p/go-libp2p-core/peer" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf +var _ = cid.Undef +var _ = sort.Sort func (t *ClientDeal) MarshalCBOR(w io.Writer) error { if t == nil { @@ -715,7 +719,8 @@ func (t *ClientDeal) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -1465,7 +1470,8 @@ func (t *MinerDeal) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -1571,7 +1577,8 @@ func (t *Balance) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -1697,7 +1704,8 @@ func (t *SignedStorageAsk) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -2019,7 +2027,8 @@ func (t *StorageAsk) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -2244,7 +2253,8 @@ func (t *DataRef) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } } @@ -2599,7 +2609,8 @@ func (t *ProviderDealState) UnmarshalCBOR(r io.Reader) error { } default: - return fmt.Errorf("unknown struct field %d: '%s'", i, name) + // Field doesn't exist on this type, so ignore it + cbg.ScanForLinks(r, func(cid.Cid) {}) } }