diff --git a/api/api_full.go b/api/api_full.go index 4dc39581f..bac0caaaf 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -144,8 +144,12 @@ type FullNode interface { // manages all incoming and outgoing 'messages' going over the network. // MpoolPending returns pending mempool messages. + // Deprecated: use MpoolSelect instead MpoolPending(context.Context, types.TipSetKey) ([]*types.SignedMessage, error) + // MpoolSelect returns a list of pending messages for inclusion in the next block + MpoolSelect(context.Context, types.TipSetKey) ([]*types.SignedMessage, error) + // MpoolPush pushes a signed message to mempool. MpoolPush(context.Context, *types.SignedMessage) (cid.Cid, error) diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index 3e2285648..de107ac42 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -94,6 +94,7 @@ type FullNodeStruct struct { SyncMarkBad func(ctx context.Context, bcid cid.Cid) error `perm:"admin"` SyncCheckBad func(ctx context.Context, bcid cid.Cid) (string, error) `perm:"read"` + MpoolSelect func(context.Context, types.TipSetKey) ([]*types.SignedMessage, error) `perm:"read"` MpoolPending func(context.Context, types.TipSetKey) ([]*types.SignedMessage, error) `perm:"read"` MpoolPush func(context.Context, *types.SignedMessage) (cid.Cid, error) `perm:"write"` MpoolPushMessage func(context.Context, *types.Message) (*types.SignedMessage, error) `perm:"sign"` @@ -433,6 +434,10 @@ func (c *FullNodeStruct) GasEstimateGasLimit(ctx context.Context, msg *types.Mes return c.Internal.GasEstimateGasLimit(ctx, msg, tsk) } +func (c *FullNodeStruct) MpoolSelect(ctx context.Context, tsk types.TipSetKey) ([]*types.SignedMessage, error) { + return c.Internal.MpoolSelect(ctx, tsk) +} + func (c *FullNodeStruct) MpoolPending(ctx context.Context, tsk types.TipSetKey) ([]*types.SignedMessage, error) { return c.Internal.MpoolPending(ctx, tsk) } diff --git a/cli/state.go b/cli/state.go index 3495b4301..86c2f314d 100644 --- a/cli/state.go +++ b/cli/state.go @@ -36,7 +36,6 @@ import ( "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/stmgr" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/miner" ) var stateCmd = &cli.Command{ @@ -857,12 +856,7 @@ var stateComputeStateCmd = &cli.Command{ var msgs []*types.Message if cctx.Bool("apply-mpool-messages") { - pmsgs, err := api.MpoolPending(ctx, ts.Key()) - if err != nil { - return err - } - - pmsgs, err = miner.SelectMessages(ctx, api.StateGetActor, ts, pmsgs) + pmsgs, err := api.MpoolSelect(ctx, ts.Key()) if err != nil { return err } @@ -942,7 +936,7 @@ var compStateTemplate = ` font-size: 12px; border-collapse: collapse; } - tr { + tr { border-top: 1px solid black; border-bottom: 1px solid black; } @@ -961,7 +955,7 @@ var compStateTemplate = ` /** Checked State **/ - + .ellipsis-toggle input:checked + .ellipsis { display: none; } @@ -1014,7 +1008,7 @@ var compStateMsg = `
{{JsonParams ($code) (.Msg.Method) (.Msg.Params) | html}}
{{JsonReturn ($code) (.Msg.Method) (.MsgRct.Return) | html}}