post-upstream-merge fixes
This commit is contained in:
parent
d787aa5007
commit
794429dd55
15
cli/state.go
15
cli/state.go
@ -5,6 +5,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
miner2 "github.com/filecoin-project/specs-actors/actors/builtin/miner"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -93,24 +94,16 @@ var stateMinerInfo = &cli.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
var mst actors.StorageMinerActorState
|
||||
var mst miner2.State
|
||||
if err := mst.UnmarshalCBOR(bytes.NewReader(aso)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mio, err := api.ChainReadObj(ctx, mst.Info)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var mi actors.MinerInfo
|
||||
if err := mi.UnmarshalCBOR(bytes.NewReader(mio)); err != nil {
|
||||
return err
|
||||
}
|
||||
mi := mst.Info
|
||||
|
||||
fmt.Printf("Owner:\t%s\n", mi.Owner)
|
||||
fmt.Printf("Worker:\t%s\n", mi.Worker)
|
||||
fmt.Printf("PeerID:\t%s\n", mi.PeerID)
|
||||
fmt.Printf("PeerID:\t%s\n", mi.PeerId)
|
||||
fmt.Printf("SectorSize:\t%s (%d)\n", units.BytesSize(float64(mi.SectorSize)), mi.SectorSize)
|
||||
|
||||
return nil
|
||||
|
@ -7,7 +7,6 @@ import (
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"runtime/pprof"
|
||||
|
@ -105,7 +105,6 @@ func (t *HelloMessage) UnmarshalCBOR(r io.Reader) error {
|
||||
if maj != cbg.MajUnsignedInt {
|
||||
return fmt.Errorf("wrong type for uint64 field")
|
||||
}
|
||||
t.HeaviestTipSetHeight = uint64(extra)
|
||||
// t.HeaviestTipSetWeight (types.BigInt) (struct)
|
||||
|
||||
{
|
||||
|
@ -2,6 +2,7 @@ package hello
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/filecoin-project/specs-actors/actors/abi"
|
||||
"time"
|
||||
|
||||
"github.com/filecoin-project/specs-actors/actors/abi/big"
|
||||
@ -25,7 +26,7 @@ var log = logging.Logger("hello")
|
||||
|
||||
type HelloMessage struct {
|
||||
HeaviestTipSet []cid.Cid
|
||||
HeaviestTipSetHeight uint64
|
||||
HeaviestTipSetHeight abi.ChainEpoch
|
||||
HeaviestTipSetWeight big.Int
|
||||
GenesisHash cid.Cid
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ type storageMinerApi interface {
|
||||
|
||||
MpoolPushMessage(context.Context, *types.Message) (*types.SignedMessage, error)
|
||||
|
||||
ChainHead(context.Context) (types.TipSetKey, error)
|
||||
ChainHead(context.Context) (*types.TipSet, error)
|
||||
ChainNotify(context.Context) (<-chan []*store.HeadChange, error)
|
||||
ChainGetRandomness(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error)
|
||||
ChainGetTipSetByHeight(context.Context, abi.ChainEpoch, types.TipSetKey) (*types.TipSet, error)
|
||||
|
@ -45,7 +45,7 @@ type sealingApi interface { // TODO: trim down
|
||||
|
||||
MpoolPushMessage(context.Context, *types.Message) (*types.SignedMessage, error)
|
||||
|
||||
ChainHead(context.Context) (types.TipSetKey, error)
|
||||
ChainHead(context.Context) (*types.TipSet, error)
|
||||
ChainNotify(context.Context) (<-chan []*store.HeadChange, error)
|
||||
ChainGetRandomness(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error)
|
||||
ChainGetTipSetByHeight(context.Context, abi.ChainEpoch, types.TipSetKey) (*types.TipSet, error)
|
||||
|
Loading…
Reference in New Issue
Block a user