Fix debug build
This commit is contained in:
parent
18627e77ff
commit
3b29aacfdc
@ -5,7 +5,6 @@ package main
|
|||||||
import (
|
import (
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
"github.com/filecoin-project/lotus/build"
|
"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/gen"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
lcli "github.com/filecoin-project/lotus/cli"
|
lcli "github.com/filecoin-project/lotus/cli"
|
||||||
@ -48,22 +47,10 @@ func init() {
|
|||||||
var ticket *types.Ticket
|
var ticket *types.Ticket
|
||||||
{
|
{
|
||||||
vrfBase := head.MinTicket().VRFProof
|
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 {
|
w, err := api.StateMinerWorker(ctx, addr, nil)
|
||||||
return xerrors.Errorf("failed to get miner worker addr (exit code %d)", ret.ExitCode)
|
|
||||||
}
|
|
||||||
|
|
||||||
w, err := address.NewFromBytes(ret.Return)
|
|
||||||
if err != 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)
|
t, err := gen.ComputeVRF(ctx, api.WalletSign, w, addr, gen.DSepTicket, vrfBase)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user