Skip to content

Commit f6805f2

Browse files
authored
Merge pull request #8534 from filecoin-project/asr/refactor
Use new go-state-types state accessors
2 parents ee11018 + 3b23ba0 commit f6805f2

File tree

257 files changed

+3887
-4314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+3887
-4314
lines changed

api/api_full.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ import (
2020
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
2121
"github.com/filecoin-project/go-fil-markets/storagemarket"
2222

23+
"github.com/filecoin-project/go-state-types/builtin/v8/market"
24+
"github.com/filecoin-project/go-state-types/builtin/v8/miner"
25+
"github.com/filecoin-project/go-state-types/builtin/v8/paych"
2326
apitypes "github.com/filecoin-project/lotus/api/types"
2427
"github.com/filecoin-project/lotus/chain/actors/builtin"
25-
"github.com/filecoin-project/lotus/chain/actors/builtin/market"
26-
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
27-
"github.com/filecoin-project/lotus/chain/actors/builtin/paych"
28+
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
2829
"github.com/filecoin-project/lotus/chain/actors/builtin/power"
2930
"github.com/filecoin-project/lotus/chain/types"
3031
"github.com/filecoin-project/lotus/node/modules/dtypes"
@@ -443,7 +444,7 @@ type FullNode interface {
443444
// StateMinerPower returns the power of the indicated miner
444445
StateMinerPower(context.Context, address.Address, types.TipSetKey) (*MinerPower, error) //perm:read
445446
// StateMinerInfo returns info about the indicated miner
446-
StateMinerInfo(context.Context, address.Address, types.TipSetKey) (miner.MinerInfo, error) //perm:read
447+
StateMinerInfo(context.Context, address.Address, types.TipSetKey) (MinerInfo, error) //perm:read
447448
// StateMinerDeadlines returns all the proving deadlines for the given miner
448449
StateMinerDeadlines(context.Context, address.Address, types.TipSetKey) ([]Deadline, error) //perm:read
449450
// StateMinerPartitions returns all partitions in the specified deadline
@@ -469,9 +470,9 @@ type FullNode interface {
469470
// expiration epoch
470471
StateSectorGetInfo(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorOnChainInfo, error) //perm:read
471472
// StateSectorExpiration returns epoch at which given sector will expire
472-
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorExpiration, error) //perm:read
473+
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*lminer.SectorExpiration, error) //perm:read
473474
// StateSectorPartition finds deadline/partition with the specified sector
474-
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*miner.SectorLocation, error) //perm:read
475+
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*lminer.SectorLocation, error) //perm:read
475476
// StateSearchMsg looks back up to limit epochs in the chain for a message, and returns its receipt and the tipset where it was executed
476477
//
477478
// NOTE: If a replacing message is found on chain, this method will return

api/api_gateway.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"github.com/filecoin-project/go-state-types/abi"
1010
"github.com/filecoin-project/go-state-types/dline"
1111

12+
"github.com/filecoin-project/go-state-types/builtin/v8/miner"
1213
apitypes "github.com/filecoin-project/lotus/api/types"
13-
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
1414
"github.com/filecoin-project/lotus/chain/types"
1515
)
1616

@@ -56,7 +56,7 @@ type Gateway interface {
5656
StateLookupID(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
5757
StateMarketBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MarketBalance, error)
5858
StateMarketStorageDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*MarketDeal, error)
59-
StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (miner.MinerInfo, error)
59+
StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (MinerInfo, error)
6060
StateMinerProvingDeadline(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*dline.Info, error)
6161
StateMinerPower(context.Context, address.Address, types.TipSetKey) (*MinerPower, error)
6262
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error)

api/api_storage.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"context"
66
"time"
77

8+
"github.com/filecoin-project/go-state-types/builtin/v8/miner"
89
"github.com/filecoin-project/lotus/chain/actors/builtin"
9-
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
1010

1111
"github.com/google/uuid"
1212
"github.com/ipfs/go-cid"
@@ -15,8 +15,8 @@ import (
1515
"github.com/filecoin-project/go-address"
1616
datatransfer "github.com/filecoin-project/go-data-transfer"
1717
"github.com/filecoin-project/go-state-types/abi"
18+
"github.com/filecoin-project/go-state-types/builtin/v8/market"
1819
abinetwork "github.com/filecoin-project/go-state-types/network"
19-
"github.com/filecoin-project/specs-actors/v8/actors/builtin/market"
2020
"github.com/filecoin-project/specs-storage/storage"
2121

2222
"github.com/filecoin-project/go-fil-markets/piecestore"

api/api_worker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package api
33
import (
44
"context"
55

6+
"github.com/filecoin-project/go-state-types/proof"
7+
68
"github.com/google/uuid"
79
"github.com/ipfs/go-cid"
810

911
"github.com/filecoin-project/go-state-types/abi"
10-
"github.com/filecoin-project/specs-actors/v5/actors/runtime/proof"
11-
1212
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
1313
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
1414
"github.com/filecoin-project/specs-storage/storage"

0 commit comments

Comments
 (0)