From 3b29aacfdc9f9ae03ab9c412b85e6ba4d8ab6c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 21 Feb 2020 20:31:45 +0100 Subject: [PATCH] Fix debug build --- cmd/lotus/debug_advance.go | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/cmd/lotus/debug_advance.go b/cmd/lotus/debug_advance.go index 1213b69a9..2aea41e5c 100644 --- a/cmd/lotus/debug_advance.go +++ b/cmd/lotus/debug_advance.go @@ -5,7 +5,6 @@ package main import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/lotus/build" - "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/gen" "github.com/filecoin-project/lotus/chain/types" lcli "github.com/filecoin-project/lotus/cli" @@ -48,22 +47,10 @@ func init() { var ticket *types.Ticket { vrfBase := head.MinTicket().VRFProof - ret, err := api.StateCall(ctx, &types.Message{ - From: addr, - To: addr, - Method: actors.MAMethods.GetWorkerAddr, - }, head) - if err != nil { - return xerrors.Errorf("failed to get miner worker addr: %w", err) - } - if ret.ExitCode != 0 { - return xerrors.Errorf("failed to get miner worker addr (exit code %d)", ret.ExitCode) - } - - w, err := address.NewFromBytes(ret.Return) + w, err := api.StateMinerWorker(ctx, addr, nil) if err != nil { - return xerrors.Errorf("GetWorkerAddr returned malformed address: %w", err) + return xerrors.Errorf("StateMinerWorker: %w", err) } t, err := gen.ComputeVRF(ctx, api.WalletSign, w, addr, gen.DSepTicket, vrfBase) if err != nil {