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 {