fix: chain: use latest go-state-types types for miner UI
This commit is contained in:
parent
512c70bb39
commit
c86f5a1b2b
@ -32,6 +32,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
|
||||||
"github.com/filecoin-project/go-jsonrpc/auth"
|
"github.com/filecoin-project/go-jsonrpc/auth"
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
"github.com/filecoin-project/go-state-types/builtin/v12/miner"
|
||||||
"github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
|
"github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
|
||||||
"github.com/filecoin-project/go-state-types/crypto"
|
"github.com/filecoin-project/go-state-types/crypto"
|
||||||
"github.com/filecoin-project/go-state-types/exitcode"
|
"github.com/filecoin-project/go-state-types/exitcode"
|
||||||
@ -145,6 +146,7 @@ func init() {
|
|||||||
allocationId := verifreg.AllocationId(0)
|
allocationId := verifreg.AllocationId(0)
|
||||||
addExample(allocationId)
|
addExample(allocationId)
|
||||||
addExample(&allocationId)
|
addExample(&allocationId)
|
||||||
|
addExample(miner.SectorOnChainInfoFlags(0))
|
||||||
addExample(map[verifreg.AllocationId]verifreg.Allocation{})
|
addExample(map[verifreg.AllocationId]verifreg.Allocation{})
|
||||||
claimId := verifreg.ClaimId(0)
|
claimId := verifreg.ClaimId(0)
|
||||||
addExample(claimId)
|
addExample(claimId)
|
||||||
|
@ -27,8 +27,9 @@ import (
|
|||||||
auth "github.com/filecoin-project/go-jsonrpc/auth"
|
auth "github.com/filecoin-project/go-jsonrpc/auth"
|
||||||
abi "github.com/filecoin-project/go-state-types/abi"
|
abi "github.com/filecoin-project/go-state-types/abi"
|
||||||
big "github.com/filecoin-project/go-state-types/big"
|
big "github.com/filecoin-project/go-state-types/big"
|
||||||
|
miner "github.com/filecoin-project/go-state-types/builtin/v12/miner"
|
||||||
paych "github.com/filecoin-project/go-state-types/builtin/v8/paych"
|
paych "github.com/filecoin-project/go-state-types/builtin/v8/paych"
|
||||||
miner "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
miner0 "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
||||||
verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
|
verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
|
||||||
crypto "github.com/filecoin-project/go-state-types/crypto"
|
crypto "github.com/filecoin-project/go-state-types/crypto"
|
||||||
dline "github.com/filecoin-project/go-state-types/dline"
|
dline "github.com/filecoin-project/go-state-types/dline"
|
||||||
@ -36,7 +37,7 @@ import (
|
|||||||
|
|
||||||
api "github.com/filecoin-project/lotus/api"
|
api "github.com/filecoin-project/lotus/api"
|
||||||
apitypes "github.com/filecoin-project/lotus/api/types"
|
apitypes "github.com/filecoin-project/lotus/api/types"
|
||||||
miner0 "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
miner1 "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
||||||
types "github.com/filecoin-project/lotus/chain/types"
|
types "github.com/filecoin-project/lotus/chain/types"
|
||||||
ethtypes "github.com/filecoin-project/lotus/chain/types/ethtypes"
|
ethtypes "github.com/filecoin-project/lotus/chain/types/ethtypes"
|
||||||
alerting "github.com/filecoin-project/lotus/journal/alerting"
|
alerting "github.com/filecoin-project/lotus/journal/alerting"
|
||||||
@ -3549,7 +3550,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerInfo(arg0, arg1, arg2 interface{})
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateMinerInitialPledgeCollateral mocks base method.
|
// StateMinerInitialPledgeCollateral mocks base method.
|
||||||
func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateMinerInitialPledgeCollateral", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateMinerInitialPledgeCollateral", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(big.Int)
|
ret0, _ := ret[0].(big.Int)
|
||||||
@ -3594,7 +3595,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerPower(arg0, arg1, arg2 interface{}
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateMinerPreCommitDepositForPower mocks base method.
|
// StateMinerPreCommitDepositForPower mocks base method.
|
||||||
func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateMinerPreCommitDepositForPower", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateMinerPreCommitDepositForPower", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(big.Int)
|
ret0, _ := ret[0].(big.Int)
|
||||||
@ -3759,10 +3760,10 @@ func (mr *MockFullNodeMockRecorder) StateSearchMsg(arg0, arg1, arg2, arg3, arg4
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateSectorExpiration mocks base method.
|
// StateSectorExpiration mocks base method.
|
||||||
func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorExpiration, error) {
|
func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner1.SectorExpiration, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateSectorExpiration", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateSectorExpiration", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(*miner0.SectorExpiration)
|
ret0, _ := ret[0].(*miner1.SectorExpiration)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@ -3789,10 +3790,10 @@ func (mr *MockFullNodeMockRecorder) StateSectorGetInfo(arg0, arg1, arg2, arg3 in
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateSectorPartition mocks base method.
|
// StateSectorPartition mocks base method.
|
||||||
func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorLocation, error) {
|
func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner1.SectorLocation, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateSectorPartition", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateSectorPartition", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(*miner0.SectorLocation)
|
ret0, _ := ret[0].(*miner1.SectorLocation)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@ -3804,10 +3805,10 @@ func (mr *MockFullNodeMockRecorder) StateSectorPartition(arg0, arg1, arg2, arg3
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateSectorPreCommitInfo mocks base method.
|
// StateSectorPreCommitInfo mocks base method.
|
||||||
func (m *MockFullNode) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner.SectorPreCommitOnChainInfo, error) {
|
func (m *MockFullNode) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorPreCommitOnChainInfo, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateSectorPreCommitInfo", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateSectorPreCommitInfo", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(*miner.SectorPreCommitOnChainInfo)
|
ret0, _ := ret[0].(*miner0.SectorPreCommitOnChainInfo)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,9 @@ import (
|
|||||||
auth "github.com/filecoin-project/go-jsonrpc/auth"
|
auth "github.com/filecoin-project/go-jsonrpc/auth"
|
||||||
abi "github.com/filecoin-project/go-state-types/abi"
|
abi "github.com/filecoin-project/go-state-types/abi"
|
||||||
big "github.com/filecoin-project/go-state-types/big"
|
big "github.com/filecoin-project/go-state-types/big"
|
||||||
|
miner "github.com/filecoin-project/go-state-types/builtin/v12/miner"
|
||||||
paych "github.com/filecoin-project/go-state-types/builtin/v8/paych"
|
paych "github.com/filecoin-project/go-state-types/builtin/v8/paych"
|
||||||
miner "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
miner0 "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
||||||
verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
|
verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
|
||||||
crypto "github.com/filecoin-project/go-state-types/crypto"
|
crypto "github.com/filecoin-project/go-state-types/crypto"
|
||||||
dline "github.com/filecoin-project/go-state-types/dline"
|
dline "github.com/filecoin-project/go-state-types/dline"
|
||||||
@ -36,7 +37,7 @@ import (
|
|||||||
api "github.com/filecoin-project/lotus/api"
|
api "github.com/filecoin-project/lotus/api"
|
||||||
apitypes "github.com/filecoin-project/lotus/api/types"
|
apitypes "github.com/filecoin-project/lotus/api/types"
|
||||||
v0api "github.com/filecoin-project/lotus/api/v0api"
|
v0api "github.com/filecoin-project/lotus/api/v0api"
|
||||||
miner0 "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
miner1 "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
||||||
types "github.com/filecoin-project/lotus/chain/types"
|
types "github.com/filecoin-project/lotus/chain/types"
|
||||||
alerting "github.com/filecoin-project/lotus/journal/alerting"
|
alerting "github.com/filecoin-project/lotus/journal/alerting"
|
||||||
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
marketevents "github.com/filecoin-project/lotus/markets/loggers"
|
||||||
@ -2669,7 +2670,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerInfo(arg0, arg1, arg2 interface{})
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateMinerInitialPledgeCollateral mocks base method.
|
// StateMinerInitialPledgeCollateral mocks base method.
|
||||||
func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateMinerInitialPledgeCollateral", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateMinerInitialPledgeCollateral", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(big.Int)
|
ret0, _ := ret[0].(big.Int)
|
||||||
@ -2714,7 +2715,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerPower(arg0, arg1, arg2 interface{}
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateMinerPreCommitDepositForPower mocks base method.
|
// StateMinerPreCommitDepositForPower mocks base method.
|
||||||
func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateMinerPreCommitDepositForPower", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateMinerPreCommitDepositForPower", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(big.Int)
|
ret0, _ := ret[0].(big.Int)
|
||||||
@ -2894,10 +2895,10 @@ func (mr *MockFullNodeMockRecorder) StateSearchMsgLimited(arg0, arg1, arg2 inter
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateSectorExpiration mocks base method.
|
// StateSectorExpiration mocks base method.
|
||||||
func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorExpiration, error) {
|
func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner1.SectorExpiration, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateSectorExpiration", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateSectorExpiration", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(*miner0.SectorExpiration)
|
ret0, _ := ret[0].(*miner1.SectorExpiration)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@ -2924,10 +2925,10 @@ func (mr *MockFullNodeMockRecorder) StateSectorGetInfo(arg0, arg1, arg2, arg3 in
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateSectorPartition mocks base method.
|
// StateSectorPartition mocks base method.
|
||||||
func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorLocation, error) {
|
func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner1.SectorLocation, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateSectorPartition", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateSectorPartition", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(*miner0.SectorLocation)
|
ret0, _ := ret[0].(*miner1.SectorLocation)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@ -2939,10 +2940,10 @@ func (mr *MockFullNodeMockRecorder) StateSectorPartition(arg0, arg1, arg2, arg3
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateSectorPreCommitInfo mocks base method.
|
// StateSectorPreCommitInfo mocks base method.
|
||||||
func (m *MockFullNode) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) {
|
func (m *MockFullNode) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (miner0.SectorPreCommitOnChainInfo, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateSectorPreCommitInfo", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateSectorPreCommitInfo", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(miner.SectorPreCommitOnChainInfo)
|
ret0, _ := ret[0].(miner0.SectorPreCommitOnChainInfo)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -17,6 +17,7 @@ import (
|
|||||||
|
|
||||||
"github.com/filecoin-project/lotus/chain/actors/adt"
|
"github.com/filecoin-project/lotus/chain/actors/adt"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
|
miner12 "github.com/filecoin-project/go-state-types/builtin/v12/miner"
|
||||||
minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
||||||
"github.com/filecoin-project/go-state-types/manifest"
|
"github.com/filecoin-project/go-state-types/manifest"
|
||||||
|
|
||||||
@ -152,7 +153,7 @@ type Partition interface {
|
|||||||
UnprovenSectors() (bitfield.BitField, error)
|
UnprovenSectors() (bitfield.BitField, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SectorOnChainInfo = minertypes.SectorOnChainInfo
|
type SectorOnChainInfo = miner12.SectorOnChainInfo
|
||||||
|
|
||||||
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof, configWantSynthetic bool) (abi.RegisteredSealProof, error) {
|
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof, configWantSynthetic bool) (abi.RegisteredSealProof, error) {
|
||||||
// We added support for the new proofs in network version 7, and removed support for the old
|
// We added support for the new proofs in network version 7, and removed support for the old
|
||||||
|
@ -9,6 +9,7 @@ import (
|
|||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
actorstypes "github.com/filecoin-project/go-state-types/actors"
|
actorstypes "github.com/filecoin-project/go-state-types/actors"
|
||||||
"github.com/filecoin-project/go-state-types/big"
|
"github.com/filecoin-project/go-state-types/big"
|
||||||
|
miner12 "github.com/filecoin-project/go-state-types/builtin/v12/miner"
|
||||||
minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
||||||
"github.com/filecoin-project/go-state-types/cbor"
|
"github.com/filecoin-project/go-state-types/cbor"
|
||||||
"github.com/filecoin-project/go-state-types/dline"
|
"github.com/filecoin-project/go-state-types/dline"
|
||||||
@ -212,7 +213,7 @@ type Partition interface {
|
|||||||
UnprovenSectors() (bitfield.BitField, error)
|
UnprovenSectors() (bitfield.BitField, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SectorOnChainInfo = minertypes.SectorOnChainInfo
|
type SectorOnChainInfo = miner12.SectorOnChainInfo
|
||||||
|
|
||||||
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof, configWantSynthetic bool) (abi.RegisteredSealProof, error) {
|
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof, configWantSynthetic bool) (abi.RegisteredSealProof, error) {
|
||||||
// We added support for the new proofs in network version 7, and removed support for the old
|
// We added support for the new proofs in network version 7, and removed support for the old
|
||||||
|
@ -5875,12 +5875,12 @@ Response:
|
|||||||
"InitialPledge": "0",
|
"InitialPledge": "0",
|
||||||
"ExpectedDayReward": "0",
|
"ExpectedDayReward": "0",
|
||||||
"ExpectedStoragePledge": "0",
|
"ExpectedStoragePledge": "0",
|
||||||
"ReplacedSectorAge": 10101,
|
"PowerBaseEpoch": 10101,
|
||||||
"ReplacedDayReward": "0",
|
"ReplacedDayReward": "0",
|
||||||
"SectorKeyCID": {
|
"SectorKeyCID": {
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
||||||
},
|
},
|
||||||
"SimpleQAPower": true
|
"Flags": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
@ -6355,12 +6355,12 @@ Response:
|
|||||||
"InitialPledge": "0",
|
"InitialPledge": "0",
|
||||||
"ExpectedDayReward": "0",
|
"ExpectedDayReward": "0",
|
||||||
"ExpectedStoragePledge": "0",
|
"ExpectedStoragePledge": "0",
|
||||||
"ReplacedSectorAge": 10101,
|
"PowerBaseEpoch": 10101,
|
||||||
"ReplacedDayReward": "0",
|
"ReplacedDayReward": "0",
|
||||||
"SectorKeyCID": {
|
"SectorKeyCID": {
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
||||||
},
|
},
|
||||||
"SimpleQAPower": true
|
"Flags": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
@ -6760,12 +6760,12 @@ Response:
|
|||||||
"InitialPledge": "0",
|
"InitialPledge": "0",
|
||||||
"ExpectedDayReward": "0",
|
"ExpectedDayReward": "0",
|
||||||
"ExpectedStoragePledge": "0",
|
"ExpectedStoragePledge": "0",
|
||||||
"ReplacedSectorAge": 10101,
|
"PowerBaseEpoch": 10101,
|
||||||
"ReplacedDayReward": "0",
|
"ReplacedDayReward": "0",
|
||||||
"SectorKeyCID": {
|
"SectorKeyCID": {
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
||||||
},
|
},
|
||||||
"SimpleQAPower": true
|
"Flags": 0
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -7473,12 +7473,12 @@ Response:
|
|||||||
"InitialPledge": "0",
|
"InitialPledge": "0",
|
||||||
"ExpectedDayReward": "0",
|
"ExpectedDayReward": "0",
|
||||||
"ExpectedStoragePledge": "0",
|
"ExpectedStoragePledge": "0",
|
||||||
"ReplacedSectorAge": 10101,
|
"PowerBaseEpoch": 10101,
|
||||||
"ReplacedDayReward": "0",
|
"ReplacedDayReward": "0",
|
||||||
"SectorKeyCID": {
|
"SectorKeyCID": {
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
||||||
},
|
},
|
||||||
"SimpleQAPower": true
|
"Flags": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
@ -7981,12 +7981,12 @@ Response:
|
|||||||
"InitialPledge": "0",
|
"InitialPledge": "0",
|
||||||
"ExpectedDayReward": "0",
|
"ExpectedDayReward": "0",
|
||||||
"ExpectedStoragePledge": "0",
|
"ExpectedStoragePledge": "0",
|
||||||
"ReplacedSectorAge": 10101,
|
"PowerBaseEpoch": 10101,
|
||||||
"ReplacedDayReward": "0",
|
"ReplacedDayReward": "0",
|
||||||
"SectorKeyCID": {
|
"SectorKeyCID": {
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
||||||
},
|
},
|
||||||
"SimpleQAPower": true
|
"Flags": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
@ -8340,12 +8340,12 @@ Response:
|
|||||||
"InitialPledge": "0",
|
"InitialPledge": "0",
|
||||||
"ExpectedDayReward": "0",
|
"ExpectedDayReward": "0",
|
||||||
"ExpectedStoragePledge": "0",
|
"ExpectedStoragePledge": "0",
|
||||||
"ReplacedSectorAge": 10101,
|
"PowerBaseEpoch": 10101,
|
||||||
"ReplacedDayReward": "0",
|
"ReplacedDayReward": "0",
|
||||||
"SectorKeyCID": {
|
"SectorKeyCID": {
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
||||||
},
|
},
|
||||||
"SimpleQAPower": true
|
"Flags": 0
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -15,14 +15,15 @@ import (
|
|||||||
bitfield "github.com/filecoin-project/go-bitfield"
|
bitfield "github.com/filecoin-project/go-bitfield"
|
||||||
abi "github.com/filecoin-project/go-state-types/abi"
|
abi "github.com/filecoin-project/go-state-types/abi"
|
||||||
big "github.com/filecoin-project/go-state-types/big"
|
big "github.com/filecoin-project/go-state-types/big"
|
||||||
miner "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
miner "github.com/filecoin-project/go-state-types/builtin/v12/miner"
|
||||||
|
miner0 "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
||||||
verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
|
verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
|
||||||
crypto "github.com/filecoin-project/go-state-types/crypto"
|
crypto "github.com/filecoin-project/go-state-types/crypto"
|
||||||
dline "github.com/filecoin-project/go-state-types/dline"
|
dline "github.com/filecoin-project/go-state-types/dline"
|
||||||
network "github.com/filecoin-project/go-state-types/network"
|
network "github.com/filecoin-project/go-state-types/network"
|
||||||
|
|
||||||
api "github.com/filecoin-project/lotus/api"
|
api "github.com/filecoin-project/lotus/api"
|
||||||
miner0 "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
miner1 "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
||||||
types "github.com/filecoin-project/lotus/chain/types"
|
types "github.com/filecoin-project/lotus/chain/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -290,7 +291,7 @@ func (mr *MockSealingAPIMockRecorder) StateMinerInfo(arg0, arg1, arg2 interface{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateMinerInitialPledgeCollateral mocks base method.
|
// StateMinerInitialPledgeCollateral mocks base method.
|
||||||
func (m *MockSealingAPI) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
func (m *MockSealingAPI) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateMinerInitialPledgeCollateral", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateMinerInitialPledgeCollateral", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(big.Int)
|
ret0, _ := ret[0].(big.Int)
|
||||||
@ -320,7 +321,7 @@ func (mr *MockSealingAPIMockRecorder) StateMinerPartitions(arg0, arg1, arg2, arg
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateMinerPreCommitDepositForPower mocks base method.
|
// StateMinerPreCommitDepositForPower mocks base method.
|
||||||
func (m *MockSealingAPI) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
func (m *MockSealingAPI) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateMinerPreCommitDepositForPower", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateMinerPreCommitDepositForPower", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(big.Int)
|
ret0, _ := ret[0].(big.Int)
|
||||||
@ -410,10 +411,10 @@ func (mr *MockSealingAPIMockRecorder) StateSectorGetInfo(arg0, arg1, arg2, arg3
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateSectorPartition mocks base method.
|
// StateSectorPartition mocks base method.
|
||||||
func (m *MockSealingAPI) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorLocation, error) {
|
func (m *MockSealingAPI) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner1.SectorLocation, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateSectorPartition", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateSectorPartition", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(*miner0.SectorLocation)
|
ret0, _ := ret[0].(*miner1.SectorLocation)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@ -425,10 +426,10 @@ func (mr *MockSealingAPIMockRecorder) StateSectorPartition(arg0, arg1, arg2, arg
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StateSectorPreCommitInfo mocks base method.
|
// StateSectorPreCommitInfo mocks base method.
|
||||||
func (m *MockSealingAPI) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner.SectorPreCommitOnChainInfo, error) {
|
func (m *MockSealingAPI) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorPreCommitOnChainInfo, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StateSectorPreCommitInfo", arg0, arg1, arg2, arg3)
|
ret := m.ctrl.Call(m, "StateSectorPreCommitInfo", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(*miner.SectorPreCommitOnChainInfo)
|
ret0, _ := ret[0].(*miner0.SectorPreCommitOnChainInfo)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ import (
|
|||||||
actorstypes "github.com/filecoin-project/go-state-types/actors"
|
actorstypes "github.com/filecoin-project/go-state-types/actors"
|
||||||
"github.com/filecoin-project/go-state-types/big"
|
"github.com/filecoin-project/go-state-types/big"
|
||||||
"github.com/filecoin-project/go-state-types/builtin"
|
"github.com/filecoin-project/go-state-types/builtin"
|
||||||
|
miner12 "github.com/filecoin-project/go-state-types/builtin/v12/miner"
|
||||||
minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
||||||
"github.com/filecoin-project/go-state-types/crypto"
|
"github.com/filecoin-project/go-state-types/crypto"
|
||||||
"github.com/filecoin-project/go-state-types/dline"
|
"github.com/filecoin-project/go-state-types/dline"
|
||||||
@ -73,13 +74,13 @@ func (m *mockStorageMinerAPI) StateMinerPartitions(ctx context.Context, a addres
|
|||||||
return m.partitions, nil
|
return m.partitions, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *mockStorageMinerAPI) StateMinerSectors(ctx context.Context, address address.Address, snos *bitfield.BitField, key types.TipSetKey) ([]*minertypes.SectorOnChainInfo, error) {
|
func (m *mockStorageMinerAPI) StateMinerSectors(ctx context.Context, address address.Address, snos *bitfield.BitField, key types.TipSetKey) ([]*miner12.SectorOnChainInfo, error) {
|
||||||
var sis []*minertypes.SectorOnChainInfo
|
var sis []*miner12.SectorOnChainInfo
|
||||||
if snos == nil {
|
if snos == nil {
|
||||||
panic("unsupported")
|
panic("unsupported")
|
||||||
}
|
}
|
||||||
_ = snos.ForEach(func(i uint64) error {
|
_ = snos.ForEach(func(i uint64) error {
|
||||||
sis = append(sis, &minertypes.SectorOnChainInfo{
|
sis = append(sis, &miner12.SectorOnChainInfo{
|
||||||
SectorNumber: abi.SectorNumber(i),
|
SectorNumber: abi.SectorNumber(i),
|
||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user