Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update to nv17 #214

Merged
merged 1 commit into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/impl/venus_market.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

"github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log/v2"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/pkg/errors"
"go.uber.org/fx"

Expand Down
10 changes: 5 additions & 5 deletions cli/actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import (
"fmt"
"text/tabwriter"

"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"
ma "github.com/multiformats/go-multiaddr"
"github.com/urfave/cli/v2"

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
miner7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v8/actors/builtin"
"github.com/filecoin-project/go-state-types/builtin"
miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/types"
)
Expand Down Expand Up @@ -133,7 +133,7 @@ var actorSetAddrsCmd = &cli.Command{
return err
}

params, err := actors.SerializeParams(&miner7.ChangeMultiaddrsParams{NewMultiaddrs: addrs})
params, err := actors.SerializeParams(&miner9.ChangeMultiaddrsParams{NewMultiaddrs: addrs})
if err != nil {
return err
}
Expand Down Expand Up @@ -206,7 +206,7 @@ var actorSetPeeridCmd = &cli.Command{
return err
}

params, err := actors.SerializeParams(&miner7.ChangePeerIDParams{NewID: abi.PeerID(pid)})
params, err := actors.SerializeParams(&miner9.ChangePeerIDParams{NewID: abi.PeerID(pid)})
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cli/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
tm "github.com/buger/goterm"
"github.com/docker/go-units"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/urfave/cli/v2"

cborutil "github.com/filecoin-project/go-cbor-util"
Expand Down
2 changes: 1 addition & 1 deletion cli/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/filecoin-project/venus/venus-shared/actors/builtin/power"
"github.com/filecoin-project/venus/venus-shared/types"
"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/multiformats/go-multiaddr"
"github.com/urfave/cli/v2"
)
Expand Down
6 changes: 3 additions & 3 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ import (
basicnode "github.com/ipld/go-ipld-prime/node/basic"
"github.com/ipld/go-ipld-prime/traversal/selector"
"github.com/ipld/go-ipld-prime/traversal/selector/builder"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/multiformats/go-multibase"
mh "github.com/multiformats/go-multihash"
"go.uber.org/fx"
Expand All @@ -55,7 +55,7 @@ import (
"github.com/filecoin-project/go-fil-markets/storagemarket/network"
"github.com/filecoin-project/go-fil-markets/stores"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
textselector "github.com/ipld/go-ipld-selector-text-lite"

"github.com/filecoin-project/venus-market/v2/config"
Expand Down
5 changes: 1 addition & 4 deletions client/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,7 @@ func TestRoundtripUnixFS_Filestore(t *testing.T) {
}

func newTmpFile(t *testing.T) string {
f, err := os.CreateTemp("", "")
require.NoError(t, err)
require.NoError(t, f.Close())
return f.Name()
return t.TempDir() + string(os.PathSeparator) + "tmp"
}

func genInputFile(t *testing.T) (filepath string, contents []byte) {
Expand Down
2 changes: 1 addition & 1 deletion client/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/filecoin-project/venus-market/v2/models/badger"
"github.com/ipfs-force-community/metrics"

"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p/core/host"
"go.uber.org/fx"

dtimpl "github.com/filecoin-project/go-data-transfer/impl"
Expand Down
4 changes: 2 additions & 2 deletions cmd/market-client/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/fatih/color"
clientapi "github.com/filecoin-project/venus/venus-shared/api/market/client"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/urfave/cli/v2"

"github.com/filecoin-project/go-address"
Expand Down Expand Up @@ -58,7 +58,7 @@ var storageCmd = &cli.Command{
// TODO ???
// Actor consts
// TODO: pieceSize unused from actors
//nolint
// nolint
var MinDealDuration, MaxDealDuration = policy.DealDurationBounds(0)

const BlockDelaySecs = uint64(builtin7.EpochDurationSeconds)
Expand Down
2 changes: 1 addition & 1 deletion cmd/market-client/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

tm "github.com/buger/goterm"
"github.com/fatih/color"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/urfave/cli/v2"

datatransfer "github.com/filecoin-project/go-data-transfer"
Expand Down
2 changes: 1 addition & 1 deletion dagstore/market_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
acrypto "github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/venus-market/v2/config"
"github.com/filecoin-project/venus-market/v2/models"
Expand Down
9 changes: 9 additions & 0 deletions dagstore/mock_dagstore_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ func (m *MockDagStoreWrapper) LoadShard(ctx context.Context, pieceCid cid.Cid) (
return getBlockstoreFromReader(fileR, pieceCid)
}

func (m *MockDagStoreWrapper) DestroyShard(ctx context.Context, pieceCid cid.Cid, resch chan dagstore.ShardResult) error {
m.lk.Lock()
defer m.lk.Unlock()
delete(m.registrations, pieceCid)
delete(m.piecesWithBlock, pieceCid)
resch <- dagstore.ShardResult{}
return nil
}

func getBlockstoreFromReader(r io.ReadCloser, pieceCid cid.Cid) (stores.ClosableBlockstore, error) {
// Write the piece to a file
tmpFile, err := os.CreateTemp("", "dagstoretmp")
Expand Down
3 changes: 2 additions & 1 deletion fundmgr/fundmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
types2 "github.com/filecoin-project/venus/venus-shared/types"
"github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log/v2"
Expand Down Expand Up @@ -241,6 +241,7 @@ func (a *fundedAddress) requestAndWait(ctx context.Context, wallet address.Addre
}

// Used by the tests
//
//lint:ignore U1000 ingore this for now
func (a *fundedAddress) onProcessStart(fn func() bool) {
a.lk.Lock()
Expand Down
2 changes: 1 addition & 1 deletion fundmgr/fundmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
tutils "github.com/filecoin-project/specs-actors/v2/support/testing"
"github.com/filecoin-project/venus-market/v2/models/badger"
"github.com/filecoin-project/venus-market/v2/models/repo"
Expand Down
Loading