Address review
This commit is contained in:
parent
b2b20e469f
commit
3b23ba0520
@ -919,20 +919,6 @@ type MinerPower struct {
|
||||
HasMinPower bool
|
||||
}
|
||||
|
||||
type MinerInfo struct {
|
||||
Owner address.Address // Must be an ID-address.
|
||||
Worker address.Address // Must be an ID-address.
|
||||
NewWorker address.Address // Must be an ID-address.
|
||||
ControlAddresses []address.Address // Must be an ID-addresses.
|
||||
WorkerChangeEpoch abi.ChainEpoch
|
||||
PeerId *peer.ID
|
||||
Multiaddrs []abi.Multiaddrs
|
||||
WindowPoStProofType abi.RegisteredPoStProof
|
||||
SectorSize abi.SectorSize
|
||||
WindowPoStPartitionSectors uint64
|
||||
ConsensusFaultElapsed abi.ChainEpoch
|
||||
}
|
||||
|
||||
type QueryOffer struct {
|
||||
Err string
|
||||
|
||||
|
16
api/types.go
16
api/types.go
@ -5,6 +5,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/filecoin-project/go-address"
|
||||
|
||||
"github.com/libp2p/go-libp2p-core/network"
|
||||
|
||||
datatransfer "github.com/filecoin-project/go-data-transfer"
|
||||
@ -286,3 +288,17 @@ type ExportRef struct {
|
||||
FromLocalCAR string // if specified, get data from a local CARv2 file.
|
||||
DealID retrievalmarket.DealID
|
||||
}
|
||||
|
||||
type MinerInfo struct {
|
||||
Owner address.Address // Must be an ID-address.
|
||||
Worker address.Address // Must be an ID-address.
|
||||
NewWorker address.Address // Must be an ID-address.
|
||||
ControlAddresses []address.Address // Must be an ID-addresses.
|
||||
WorkerChangeEpoch abi.ChainEpoch
|
||||
PeerId *peer.ID
|
||||
Multiaddrs []abi.Multiaddrs
|
||||
WindowPoStProofType abi.RegisteredPoStProof
|
||||
SectorSize abi.SectorSize
|
||||
WindowPoStPartitionSectors uint64
|
||||
ConsensusFaultElapsed abi.ChainEpoch
|
||||
}
|
||||
|
@ -19,10 +19,10 @@ import (
|
||||
|
||||
builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin"
|
||||
|
||||
builtin8 "github.com/filecoin-project/go-state-types/builtin"
|
||||
builtin8sa "github.com/filecoin-project/specs-actors/v8/actors/builtin"
|
||||
builtin8 "github.com/filecoin-project/specs-actors/v8/actors/builtin"
|
||||
|
||||
"github.com/filecoin-project/go-state-types/abi"
|
||||
"github.com/filecoin-project/go-state-types/builtin"
|
||||
"github.com/filecoin-project/go-state-types/proof"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/actors"
|
||||
@ -31,26 +31,26 @@ import (
|
||||
smoothingtypes "github.com/filecoin-project/go-state-types/builtin/v8/util/smoothing"
|
||||
)
|
||||
|
||||
var SystemActorAddr = builtin8.SystemActorAddr
|
||||
var BurntFundsActorAddr = builtin8.BurntFundsActorAddr
|
||||
var CronActorAddr = builtin8.CronActorAddr
|
||||
var SystemActorAddr = builtin.SystemActorAddr
|
||||
var BurntFundsActorAddr = builtin.BurntFundsActorAddr
|
||||
var CronActorAddr = builtin.CronActorAddr
|
||||
var SaftAddress = makeAddress("t0122")
|
||||
var ReserveAddress = makeAddress("t090")
|
||||
var RootVerifierAddress = makeAddress("t080")
|
||||
|
||||
var (
|
||||
ExpectedLeadersPerEpoch = builtin8.ExpectedLeadersPerEpoch
|
||||
ExpectedLeadersPerEpoch = builtin.ExpectedLeadersPerEpoch
|
||||
)
|
||||
|
||||
const (
|
||||
EpochDurationSeconds = builtin8.EpochDurationSeconds
|
||||
EpochsInDay = builtin8.EpochsInDay
|
||||
SecondsInDay = builtin8.SecondsInDay
|
||||
EpochDurationSeconds = builtin.EpochDurationSeconds
|
||||
EpochsInDay = builtin.EpochsInDay
|
||||
SecondsInDay = builtin.SecondsInDay
|
||||
)
|
||||
|
||||
const (
|
||||
MethodSend = builtin8.MethodSend
|
||||
MethodConstructor = builtin8.MethodConstructor
|
||||
MethodSend = builtin.MethodSend
|
||||
MethodConstructor = builtin.MethodConstructor
|
||||
)
|
||||
|
||||
// These are all just type aliases across actor versions. In the future, that might change
|
||||
@ -93,8 +93,8 @@ func ActorNameByCode(c cid.Cid) string {
|
||||
case builtin7.IsBuiltinActor(c):
|
||||
return builtin7.ActorNameByCode(c)
|
||||
|
||||
case builtin8sa.IsBuiltinActor(c):
|
||||
return builtin8sa.ActorNameByCode(c)
|
||||
case builtin8.IsBuiltinActor(c):
|
||||
return builtin8.ActorNameByCode(c)
|
||||
|
||||
default:
|
||||
return "<unknown>"
|
||||
|
@ -6,16 +6,12 @@ import (
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
{{range .versions}}
|
||||
{{if (le . 7)}}
|
||||
builtin{{.}} "github.com/filecoin-project/specs-actors{{import .}}actors/builtin"
|
||||
{{else}}
|
||||
builtin{{.}} "github.com/filecoin-project/go-state-types/builtin"
|
||||
builtin{{.}}sa "github.com/filecoin-project/specs-actors{{import .}}actors/builtin"
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
"github.com/filecoin-project/go-state-types/abi"
|
||||
"github.com/filecoin-project/go-state-types/proof"
|
||||
"github.com/filecoin-project/go-state-types/builtin"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/actors"
|
||||
|
||||
@ -23,26 +19,26 @@ import (
|
||||
smoothingtypes "github.com/filecoin-project/go-state-types/builtin/v8/util/smoothing"
|
||||
)
|
||||
|
||||
var SystemActorAddr = builtin{{.latestVersion}}.SystemActorAddr
|
||||
var BurntFundsActorAddr = builtin{{.latestVersion}}.BurntFundsActorAddr
|
||||
var CronActorAddr = builtin{{.latestVersion}}.CronActorAddr
|
||||
var SystemActorAddr = builtin.SystemActorAddr
|
||||
var BurntFundsActorAddr = builtin.BurntFundsActorAddr
|
||||
var CronActorAddr = builtin.CronActorAddr
|
||||
var SaftAddress = makeAddress("t0122")
|
||||
var ReserveAddress = makeAddress("t090")
|
||||
var RootVerifierAddress = makeAddress("t080")
|
||||
|
||||
var (
|
||||
ExpectedLeadersPerEpoch = builtin{{.latestVersion}}.ExpectedLeadersPerEpoch
|
||||
ExpectedLeadersPerEpoch = builtin.ExpectedLeadersPerEpoch
|
||||
)
|
||||
|
||||
const (
|
||||
EpochDurationSeconds = builtin{{.latestVersion}}.EpochDurationSeconds
|
||||
EpochsInDay = builtin{{.latestVersion}}.EpochsInDay
|
||||
SecondsInDay = builtin{{.latestVersion}}.SecondsInDay
|
||||
EpochDurationSeconds = builtin.EpochDurationSeconds
|
||||
EpochsInDay = builtin.EpochsInDay
|
||||
SecondsInDay = builtin.SecondsInDay
|
||||
)
|
||||
|
||||
const (
|
||||
MethodSend = builtin{{.latestVersion}}.MethodSend
|
||||
MethodConstructor = builtin{{.latestVersion}}.MethodConstructor
|
||||
MethodSend = builtin.MethodSend
|
||||
MethodConstructor = builtin.MethodConstructor
|
||||
)
|
||||
|
||||
// These are all just type aliases across actor versions. In the future, that might change
|
||||
@ -64,13 +60,8 @@ func ActorNameByCode(c cid.Cid) string {
|
||||
|
||||
switch {
|
||||
{{range .versions}}
|
||||
{{if (le . 7)}}
|
||||
case builtin{{.}}.IsBuiltinActor(c):
|
||||
return builtin{{.}}.ActorNameByCode(c)
|
||||
{{else}}
|
||||
case builtin{{.}}sa.IsBuiltinActor(c):
|
||||
return builtin{{.}}sa.ActorNameByCode(c)
|
||||
{{end}}
|
||||
case builtin{{.}}.IsBuiltinActor(c):
|
||||
return builtin{{.}}.ActorNameByCode(c)
|
||||
{{end}}
|
||||
default:
|
||||
return "<unknown>"
|
||||
|
@ -25,17 +25,19 @@ var manifestCids map[Version]cid.Cid = map[Version]cid.Cid{
|
||||
var manifests map[Version]*manifest.Manifest
|
||||
var actorMeta map[cid.Cid]actorEntry
|
||||
|
||||
const AccountKey = "account"
|
||||
const CronKey = "cron"
|
||||
const InitKey = "init"
|
||||
const MarketKey = "storagemarket"
|
||||
const MinerKey = "storageminer"
|
||||
const MultisigKey = "multisig"
|
||||
const PaychKey = "paymentchannel"
|
||||
const PowerKey = "storagepower"
|
||||
const RewardKey = "reward"
|
||||
const SystemKey = "system"
|
||||
const VerifregKey = "verifiedregistry"
|
||||
const (
|
||||
AccountKey = "account"
|
||||
CronKey = "cron"
|
||||
InitKey = "init"
|
||||
MarketKey = "storagemarket"
|
||||
MinerKey = "storageminer"
|
||||
MultisigKey = "multisig"
|
||||
PaychKey = "paymentchannel"
|
||||
PowerKey = "storagepower"
|
||||
RewardKey = "reward"
|
||||
SystemKey = "system"
|
||||
VerifregKey = "verifiedregistry"
|
||||
)
|
||||
|
||||
var (
|
||||
manifestMx sync.RWMutex
|
||||
|
2
extern/filecoin-ffi
vendored
2
extern/filecoin-ffi
vendored
@ -1 +1 @@
|
||||
Subproject commit 4723428bc8abce6b6e56d30a86369c17ccadaf3b
|
||||
Subproject commit 73669c955cb1add67516708a4e7b04263bea626b
|
Loading…
Reference in New Issue
Block a user