From 6893dbb6573f836dc14800527f00502682aa1920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 26 Jun 2020 15:52:22 +0200 Subject: [PATCH] api: MsigCrate required param is now uint64 --- api/api_full.go | 2 +- api/apistruct/struct.go | 4 ++-- cli/multisig.go | 4 ++-- cli/state.go | 2 +- node/impl/full/state.go | 1 - 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/api/api_full.go b/api/api_full.go index 17b0fdce6..79b098a84 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -245,7 +245,7 @@ type FullNode interface { // filecoin network MsigGetAvailableBalance(context.Context, address.Address, types.TipSetKey) (types.BigInt, error) - MsigCreate(context.Context, int64, []address.Address, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) + MsigCreate(context.Context, uint64, []address.Address, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) MsigPropose(context.Context, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) MsigApprove(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) MsigCancel(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index 0c0acd05e..cf88e514a 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -158,7 +158,7 @@ type FullNodeStruct struct { StateCompute func(context.Context, abi.ChainEpoch, []*types.Message, types.TipSetKey) (*api.ComputeStateOutput, error) `perm:"read"` MsigGetAvailableBalance func(context.Context, address.Address, types.TipSetKey) (types.BigInt, error) `perm:"read"` - MsigCreate func(context.Context, int64, []address.Address, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) `perm:"sign"` + MsigCreate func(context.Context, uint64, []address.Address, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) `perm:"sign"` MsigPropose func(context.Context, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` MsigApprove func(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` MsigCancel func(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` @@ -686,7 +686,7 @@ func (c *FullNodeStruct) MsigGetAvailableBalance(ctx context.Context, a address. return c.Internal.MsigGetAvailableBalance(ctx, a, tsk) } -func (c *FullNodeStruct) MsigCreate(ctx context.Context, req int64, addrs []address.Address, val types.BigInt, src address.Address, gp types.BigInt) (cid.Cid, error) { +func (c *FullNodeStruct) MsigCreate(ctx context.Context, req uint64, addrs []address.Address, val types.BigInt, src address.Address, gp types.BigInt) (cid.Cid, error) { return c.Internal.MsigCreate(ctx, req, addrs, val, src, gp) } diff --git a/cli/multisig.go b/cli/multisig.go index e0f233db8..2d5cfad6a 100644 --- a/cli/multisig.go +++ b/cli/multisig.go @@ -105,9 +105,9 @@ var msigCreateCmd = &cli.Command{ intVal := types.BigInt(filval) - required := cctx.Int64("required") + required := cctx.Uint64("required") if required == 0 { - required = int64(len(addrs)) + required = uint64(len(addrs)) } gp := types.NewInt(1) diff --git a/cli/state.go b/cli/state.go index f1ea07db7..6624a8282 100644 --- a/cli/state.go +++ b/cli/state.go @@ -326,7 +326,7 @@ var stateProvingSetCmd = &cli.Command{ } for _, s := range sectors { - fmt.Printf("%d: %x\n", s.Info.Info.SectorNumber, s.Info.Info.SealedCID) + fmt.Printf("%d: %x\n", s.Info.SectorNumber, s.Info.SealedCID) } return nil diff --git a/node/impl/full/state.go b/node/impl/full/state.go index a6000a5a3..f7e161dab 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -699,7 +699,6 @@ func (a *StateAPI) StateMinerInitialPledgeCollateral(ctx context.Context, maddr return types.EmptyInt, xerrors.Errorf("loading tipset %s: %w", tsk, err) } - as := store.ActorStore(ctx, a.Chain.Blockstore()) var minerState miner.State