From 6827f2dce3314c6eb7b172938dd3de0da6584d82 Mon Sep 17 00:00:00 2001 From: frrist Date: Tue, 23 Mar 2021 16:15:02 -0700 Subject: [PATCH 01/10] chore: export Net commands --- cli/cmd.go | 4 ++-- cli/net.go | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cli/cmd.go b/cli/cmd.go index 19006702f..e05107933 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -56,7 +56,7 @@ var GetStorageMinerAPI = cliutil.GetStorageMinerAPI var GetWorkerAPI = cliutil.GetWorkerAPI var CommonCommands = []*cli.Command{ - netCmd, + NetCmd, authCmd, logCmd, waitApiCmd, @@ -78,7 +78,7 @@ var Commands = []*cli.Command{ WithCategory("developer", logCmd), WithCategory("developer", waitApiCmd), WithCategory("developer", fetchParamCmd), - WithCategory("network", netCmd), + WithCategory("network", NetCmd), WithCategory("network", syncCmd), pprofCmd, VersionCmd, diff --git a/cli/net.go b/cli/net.go index de9dbd767..fdd0a13d6 100644 --- a/cli/net.go +++ b/cli/net.go @@ -23,16 +23,16 @@ import ( "github.com/filecoin-project/lotus/lib/addrutil" ) -var netCmd = &cli.Command{ +var NetCmd = &cli.Command{ Name: "net", Usage: "Manage P2P Network", Subcommands: []*cli.Command{ NetPeers, - netConnect, + NetConnect, NetListen, NetId, - netFindPeer, - netScores, + NetFindPeer, + NetScores, NetReachability, NetBandwidthCmd, NetBlockCmd, @@ -112,7 +112,7 @@ var NetPeers = &cli.Command{ }, } -var netScores = &cli.Command{ +var NetScores = &cli.Command{ Name: "scores", Usage: "Print peers' pubsub scores", Flags: []cli.Flag{ @@ -175,7 +175,7 @@ var NetListen = &cli.Command{ }, } -var netConnect = &cli.Command{ +var NetConnect = &cli.Command{ Name: "connect", Usage: "Connect to a peer", ArgsUsage: "[peerMultiaddr|minerActorAddress]", @@ -264,7 +264,7 @@ var NetId = &cli.Command{ }, } -var netFindPeer = &cli.Command{ +var NetFindPeer = &cli.Command{ Name: "findpeer", Usage: "Find the addresses of a given peerID", ArgsUsage: "[peerId]", From 1062117562cc988064a5f5caca0cfe83a037e3e5 Mon Sep 17 00:00:00 2001 From: frrist Date: Tue, 23 Mar 2021 16:19:22 -0700 Subject: [PATCH 02/10] chore: export log cli commands --- cli/cmd.go | 4 ++-- cli/log.go | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/cmd.go b/cli/cmd.go index e05107933..ce39f1566 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -58,7 +58,7 @@ var GetWorkerAPI = cliutil.GetWorkerAPI var CommonCommands = []*cli.Command{ NetCmd, authCmd, - logCmd, + LogCmd, waitApiCmd, fetchParamCmd, pprofCmd, @@ -75,7 +75,7 @@ var Commands = []*cli.Command{ WithCategory("developer", mpoolCmd), WithCategory("developer", stateCmd), WithCategory("developer", chainCmd), - WithCategory("developer", logCmd), + WithCategory("developer", LogCmd), WithCategory("developer", waitApiCmd), WithCategory("developer", fetchParamCmd), WithCategory("network", NetCmd), diff --git a/cli/log.go b/cli/log.go index a4aeaad5c..4ab6aa748 100644 --- a/cli/log.go +++ b/cli/log.go @@ -7,16 +7,16 @@ import ( "golang.org/x/xerrors" ) -var logCmd = &cli.Command{ +var LogCmd = &cli.Command{ Name: "log", Usage: "Manage logging", Subcommands: []*cli.Command{ - logList, - logSetLevel, + LogList, + LogSetLevel, }, } -var logList = &cli.Command{ +var LogList = &cli.Command{ Name: "list", Usage: "List log systems", Action: func(cctx *cli.Context) error { @@ -41,7 +41,7 @@ var logList = &cli.Command{ }, } -var logSetLevel = &cli.Command{ +var LogSetLevel = &cli.Command{ Name: "set-level", Usage: "Set log level", ArgsUsage: "[level]", From 8f6ea05d4817e575494f47627d3dd640d55d4ad8 Mon Sep 17 00:00:00 2001 From: frrist Date: Tue, 23 Mar 2021 16:19:33 -0700 Subject: [PATCH 03/10] chore: export chain commands --- cli/chain.go | 68 ++++++++++++++++++++++++------------------------- cli/cmd.go | 2 +- cli/disputer.go | 2 +- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/cli/chain.go b/cli/chain.go index e86cac9b3..1574f3f64 100644 --- a/cli/chain.go +++ b/cli/chain.go @@ -38,31 +38,31 @@ import ( types "github.com/filecoin-project/lotus/chain/types" ) -var chainCmd = &cli.Command{ +var ChainCmd = &cli.Command{ Name: "chain", Usage: "Interact with filecoin blockchain", Subcommands: []*cli.Command{ - chainHeadCmd, - chainGetBlock, - chainReadObjCmd, - chainDeleteObjCmd, - chainStatObjCmd, - chainGetMsgCmd, - chainSetHeadCmd, - chainListCmd, - chainGetCmd, - chainBisectCmd, - chainExportCmd, - slashConsensusFault, - chainGasPriceCmd, - chainInspectUsage, - chainDecodeCmd, - chainEncodeCmd, - chainDisputeSetCmd, + ChainHeadCmd, + ChainGetBlock, + ChainReadObjCmd, + ChainDeleteObjCmd, + ChainStatObjCmd, + ChainGetMsgCmd, + ChainSetHeadCmd, + ChainListCmd, + ChainGetCmd, + ChainBisectCmd, + ChainExportCmd, + SlashConsensusFault, + ChainGasPriceCmd, + ChainInspectUsage, + ChainDecodeCmd, + ChainEncodeCmd, + ChainDisputeSetCmd, }, } -var chainHeadCmd = &cli.Command{ +var ChainHeadCmd = &cli.Command{ Name: "head", Usage: "Print chain head", Action: func(cctx *cli.Context) error { @@ -85,7 +85,7 @@ var chainHeadCmd = &cli.Command{ }, } -var chainGetBlock = &cli.Command{ +var ChainGetBlock = &cli.Command{ Name: "getblock", Usage: "Get a block and print its details", ArgsUsage: "[blockCid]", @@ -176,7 +176,7 @@ func apiMsgCids(in []lapi.Message) []cid.Cid { return out } -var chainReadObjCmd = &cli.Command{ +var ChainReadObjCmd = &cli.Command{ Name: "read-obj", Usage: "Read the raw bytes of an object", ArgsUsage: "[objectCid]", @@ -203,7 +203,7 @@ var chainReadObjCmd = &cli.Command{ }, } -var chainDeleteObjCmd = &cli.Command{ +var ChainDeleteObjCmd = &cli.Command{ Name: "delete-obj", Usage: "Delete an object from the chain blockstore", Description: "WARNING: Removing wrong objects from the chain blockstore may lead to sync issues", @@ -240,7 +240,7 @@ var chainDeleteObjCmd = &cli.Command{ }, } -var chainStatObjCmd = &cli.Command{ +var ChainStatObjCmd = &cli.Command{ Name: "stat-obj", Usage: "Collect size and ipld link counts for objs", ArgsUsage: "[cid]", @@ -287,7 +287,7 @@ var chainStatObjCmd = &cli.Command{ }, } -var chainGetMsgCmd = &cli.Command{ +var ChainGetMsgCmd = &cli.Command{ Name: "getmessage", Usage: "Get and print a message by its cid", ArgsUsage: "[messageCid]", @@ -335,7 +335,7 @@ var chainGetMsgCmd = &cli.Command{ }, } -var chainSetHeadCmd = &cli.Command{ +var ChainSetHeadCmd = &cli.Command{ Name: "sethead", Usage: "manually set the local nodes head tipset (Caution: normally only used for recovery)", ArgsUsage: "[tipsetkey]", @@ -384,7 +384,7 @@ var chainSetHeadCmd = &cli.Command{ }, } -var chainInspectUsage = &cli.Command{ +var ChainInspectUsage = &cli.Command{ Name: "inspect-usage", Usage: "Inspect block space usage of a given tipset", Flags: []cli.Flag{ @@ -529,7 +529,7 @@ var chainInspectUsage = &cli.Command{ }, } -var chainListCmd = &cli.Command{ +var ChainListCmd = &cli.Command{ Name: "list", Aliases: []string{"love"}, Usage: "View a segment of the chain", @@ -658,7 +658,7 @@ var chainListCmd = &cli.Command{ }, } -var chainGetCmd = &cli.Command{ +var ChainGetCmd = &cli.Command{ Name: "get", Usage: "Get chain DAG node by path", ArgsUsage: "[path]", @@ -905,7 +905,7 @@ func printTipSet(format string, ts *types.TipSet) { fmt.Println(format) } -var chainBisectCmd = &cli.Command{ +var ChainBisectCmd = &cli.Command{ Name: "bisect", Usage: "bisect chain for an event", ArgsUsage: "[minHeight maxHeight path shellCommand ]", @@ -1028,7 +1028,7 @@ var chainBisectCmd = &cli.Command{ }, } -var chainExportCmd = &cli.Command{ +var ChainExportCmd = &cli.Command{ Name: "export", Usage: "export chain to a car file", ArgsUsage: "[outputPath]", @@ -1106,7 +1106,7 @@ var chainExportCmd = &cli.Command{ }, } -var slashConsensusFault = &cli.Command{ +var SlashConsensusFault = &cli.Command{ Name: "slash-consensus", Usage: "Report consensus fault", ArgsUsage: "[blockCid1 blockCid2]", @@ -1227,7 +1227,7 @@ var slashConsensusFault = &cli.Command{ }, } -var chainGasPriceCmd = &cli.Command{ +var ChainGasPriceCmd = &cli.Command{ Name: "gas-price", Usage: "Estimate gas prices", Action: func(cctx *cli.Context) error { @@ -1254,7 +1254,7 @@ var chainGasPriceCmd = &cli.Command{ }, } -var chainDecodeCmd = &cli.Command{ +var ChainDecodeCmd = &cli.Command{ Name: "decode", Usage: "decode various types", Subcommands: []*cli.Command{ @@ -1334,7 +1334,7 @@ var chainDecodeParamsCmd = &cli.Command{ }, } -var chainEncodeCmd = &cli.Command{ +var ChainEncodeCmd = &cli.Command{ Name: "encode", Usage: "encode various types", Subcommands: []*cli.Command{ diff --git a/cli/cmd.go b/cli/cmd.go index ce39f1566..e850adb18 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -74,7 +74,7 @@ var Commands = []*cli.Command{ WithCategory("developer", authCmd), WithCategory("developer", mpoolCmd), WithCategory("developer", stateCmd), - WithCategory("developer", chainCmd), + WithCategory("developer", ChainCmd), WithCategory("developer", LogCmd), WithCategory("developer", waitApiCmd), WithCategory("developer", fetchParamCmd), diff --git a/cli/disputer.go b/cli/disputer.go index 1a72173c3..ded240a80 100644 --- a/cli/disputer.go +++ b/cli/disputer.go @@ -35,7 +35,7 @@ type minerDeadline struct { index uint64 } -var chainDisputeSetCmd = &cli.Command{ +var ChainDisputeSetCmd = &cli.Command{ Name: "disputer", Usage: "interact with the window post disputer", Flags: []cli.Flag{ From 22329b96b4956a2faf23ec0d3e87e88c0d123133 Mon Sep 17 00:00:00 2001 From: frrist Date: Tue, 23 Mar 2021 16:21:04 -0700 Subject: [PATCH 04/10] chore: export state cli commands --- cli/cmd.go | 2 +- cli/state.go | 90 ++++++++++++++++++++++++++-------------------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/cli/cmd.go b/cli/cmd.go index e850adb18..5860d42c4 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -73,7 +73,7 @@ var Commands = []*cli.Command{ WithCategory("basic", paychCmd), WithCategory("developer", authCmd), WithCategory("developer", mpoolCmd), - WithCategory("developer", stateCmd), + WithCategory("developer", StateCmd), WithCategory("developer", ChainCmd), WithCategory("developer", LogCmd), WithCategory("developer", waitApiCmd), diff --git a/cli/state.go b/cli/state.go index df64c7ddf..12689c7e3 100644 --- a/cli/state.go +++ b/cli/state.go @@ -41,7 +41,7 @@ import ( "github.com/filecoin-project/lotus/chain/types" ) -var stateCmd = &cli.Command{ +var StateCmd = &cli.Command{ Name: "state", Usage: "Interact with and query filecoin chain state", Flags: []cli.Flag{ @@ -51,32 +51,32 @@ var stateCmd = &cli.Command{ }, }, Subcommands: []*cli.Command{ - statePowerCmd, - stateSectorsCmd, - stateActiveSectorsCmd, - stateListActorsCmd, - stateListMinersCmd, - stateCircSupplyCmd, - stateSectorCmd, - stateGetActorCmd, - stateLookupIDCmd, - stateReplayCmd, - stateSectorSizeCmd, - stateReadStateCmd, - stateListMessagesCmd, - stateComputeStateCmd, - stateCallCmd, - stateGetDealSetCmd, - stateWaitMsgCmd, - stateSearchMsgCmd, - stateMinerInfo, - stateMarketCmd, - stateExecTraceCmd, - stateNtwkVersionCmd, + StatePowerCmd, + StateSectorsCmd, + StateActiveSectorsCmd, + StateListActorsCmd, + StateListMinersCmd, + StateCircSupplyCmd, + StateSectorCmd, + StateGetActorCmd, + StateLookupIDCmd, + StateReplayCmd, + StateSectorSizeCmd, + StateReadStateCmd, + StateListMessagesCmd, + StateComputeStateCmd, + StateCallCmd, + StateGetDealSetCmd, + StateWaitMsgCmd, + StateSearchMsgCmd, + StateMinerInfo, + StateMarketCmd, + StateExecTraceCmd, + StateNtwkVersionCmd, }, } -var stateMinerInfo = &cli.Command{ +var StateMinerInfo = &cli.Command{ Name: "miner-info", Usage: "Retrieve miner information", ArgsUsage: "[minerAddress]", @@ -219,7 +219,7 @@ func ParseTipSetRef(ctx context.Context, api api.FullNode, tss string) (*types.T return ts, nil } -var statePowerCmd = &cli.Command{ +var StatePowerCmd = &cli.Command{ Name: "power", Usage: "Query network or miner power", ArgsUsage: "[ (optional)]", @@ -263,7 +263,7 @@ var statePowerCmd = &cli.Command{ }, } -var stateSectorsCmd = &cli.Command{ +var StateSectorsCmd = &cli.Command{ Name: "sectors", Usage: "Query the sector set of a miner", ArgsUsage: "[minerAddress]", @@ -303,7 +303,7 @@ var stateSectorsCmd = &cli.Command{ }, } -var stateActiveSectorsCmd = &cli.Command{ +var StateActiveSectorsCmd = &cli.Command{ Name: "active-sectors", Usage: "Query the active sector set of a miner", ArgsUsage: "[minerAddress]", @@ -343,7 +343,7 @@ var stateActiveSectorsCmd = &cli.Command{ }, } -var stateExecTraceCmd = &cli.Command{ +var StateExecTraceCmd = &cli.Command{ Name: "exec-trace", Usage: "Get the execution trace of a given message", ArgsUsage: "", @@ -411,7 +411,7 @@ var stateExecTraceCmd = &cli.Command{ }, } -var stateReplayCmd = &cli.Command{ +var StateReplayCmd = &cli.Command{ Name: "replay", Usage: "Replay a particular message", ArgsUsage: "", @@ -476,7 +476,7 @@ var stateReplayCmd = &cli.Command{ }, } -var stateGetDealSetCmd = &cli.Command{ +var StateGetDealSetCmd = &cli.Command{ Name: "get-deal", Usage: "View on-chain deal info", ArgsUsage: "[dealId]", @@ -518,7 +518,7 @@ var stateGetDealSetCmd = &cli.Command{ }, } -var stateListMinersCmd = &cli.Command{ +var StateListMinersCmd = &cli.Command{ Name: "list-miners", Usage: "list all miners in the network", Flags: []cli.Flag{ @@ -590,7 +590,7 @@ func getDealsCounts(ctx context.Context, lapi api.FullNode) (map[address.Address return out, nil } -var stateListActorsCmd = &cli.Command{ +var StateListActorsCmd = &cli.Command{ Name: "list-actors", Usage: "list all actors in the network", Action: func(cctx *cli.Context) error { @@ -620,7 +620,7 @@ var stateListActorsCmd = &cli.Command{ }, } -var stateGetActorCmd = &cli.Command{ +var StateGetActorCmd = &cli.Command{ Name: "get-actor", Usage: "Print actor information", ArgsUsage: "[actorrAddress]", @@ -664,7 +664,7 @@ var stateGetActorCmd = &cli.Command{ }, } -var stateLookupIDCmd = &cli.Command{ +var StateLookupIDCmd = &cli.Command{ Name: "lookup", Usage: "Find corresponding ID address", ArgsUsage: "[address]", @@ -715,7 +715,7 @@ var stateLookupIDCmd = &cli.Command{ }, } -var stateSectorSizeCmd = &cli.Command{ +var StateSectorSizeCmd = &cli.Command{ Name: "sector-size", Usage: "Look up miners sector size", ArgsUsage: "[minerAddress]", @@ -752,7 +752,7 @@ var stateSectorSizeCmd = &cli.Command{ }, } -var stateReadStateCmd = &cli.Command{ +var StateReadStateCmd = &cli.Command{ Name: "read-state", Usage: "View a json representation of an actors state", ArgsUsage: "[actorAddress]", @@ -794,7 +794,7 @@ var stateReadStateCmd = &cli.Command{ }, } -var stateListMessagesCmd = &cli.Command{ +var StateListMessagesCmd = &cli.Command{ Name: "list-messages", Usage: "list messages on chain matching given criteria", Flags: []cli.Flag{ @@ -907,7 +907,7 @@ var stateListMessagesCmd = &cli.Command{ }, } -var stateComputeStateCmd = &cli.Command{ +var StateComputeStateCmd = &cli.Command{ Name: "compute-state", Usage: "Perform state computations", Flags: []cli.Flag{ @@ -1365,7 +1365,7 @@ func jsonReturn(code cid.Cid, method abi.MethodNum, ret []byte) (string, error) return string(b), err } -var stateWaitMsgCmd = &cli.Command{ +var StateWaitMsgCmd = &cli.Command{ Name: "wait-msg", Usage: "Wait for a message to appear on chain", ArgsUsage: "[messageCid]", @@ -1407,7 +1407,7 @@ var stateWaitMsgCmd = &cli.Command{ }, } -var stateSearchMsgCmd = &cli.Command{ +var StateSearchMsgCmd = &cli.Command{ Name: "search-msg", Usage: "Search to see whether a message has appeared on chain", ArgsUsage: "[messageCid]", @@ -1484,7 +1484,7 @@ func printMsg(ctx context.Context, api api.FullNode, msg cid.Cid, mw *lapi.MsgLo return nil } -var stateCallCmd = &cli.Command{ +var StateCallCmd = &cli.Command{ Name: "call", Usage: "Invoke a method on an actor locally", ArgsUsage: "[toAddress methodId (optional)]", @@ -1692,7 +1692,7 @@ func parseParamsForMethod(act cid.Cid, method uint64, args []string) ([]byte, er return buf.Bytes(), nil } -var stateCircSupplyCmd = &cli.Command{ +var StateCircSupplyCmd = &cli.Command{ Name: "circulating-supply", Usage: "Get the exact current circulating supply of Filecoin", Flags: []cli.Flag{ @@ -1741,7 +1741,7 @@ var stateCircSupplyCmd = &cli.Command{ }, } -var stateSectorCmd = &cli.Command{ +var StateSectorCmd = &cli.Command{ Name: "sector", Usage: "Get miner sector info", ArgsUsage: "[miner address] [sector number]", @@ -1815,7 +1815,7 @@ var stateSectorCmd = &cli.Command{ }, } -var stateMarketCmd = &cli.Command{ +var StateMarketCmd = &cli.Command{ Name: "market", Usage: "Inspect the storage market actor", Subcommands: []*cli.Command{ @@ -1861,7 +1861,7 @@ var stateMarketBalanceCmd = &cli.Command{ }, } -var stateNtwkVersionCmd = &cli.Command{ +var StateNtwkVersionCmd = &cli.Command{ Name: "network-version", Usage: "Returns the network version", Action: func(cctx *cli.Context) error { From 89c45fe7ef7042e415e242571fb3c474d78094e3 Mon Sep 17 00:00:00 2001 From: frrist Date: Tue, 23 Mar 2021 16:23:22 -0700 Subject: [PATCH 05/10] chore: export sync cli commands --- cli/cmd.go | 2 +- cli/sync.go | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cli/cmd.go b/cli/cmd.go index 5860d42c4..cf0b99c81 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -79,7 +79,7 @@ var Commands = []*cli.Command{ WithCategory("developer", waitApiCmd), WithCategory("developer", fetchParamCmd), WithCategory("network", NetCmd), - WithCategory("network", syncCmd), + WithCategory("network", SyncCmd), pprofCmd, VersionCmd, } diff --git a/cli/sync.go b/cli/sync.go index ff7d4bd65..223d50337 100644 --- a/cli/sync.go +++ b/cli/sync.go @@ -15,20 +15,20 @@ import ( "github.com/filecoin-project/lotus/build" ) -var syncCmd = &cli.Command{ +var SyncCmd = &cli.Command{ Name: "sync", Usage: "Inspect or interact with the chain syncer", Subcommands: []*cli.Command{ - syncStatusCmd, - syncWaitCmd, - syncMarkBadCmd, - syncUnmarkBadCmd, - syncCheckBadCmd, - syncCheckpointCmd, + SyncStatusCmd, + SyncWaitCmd, + SyncMarkBadCmd, + SyncUnmarkBadCmd, + SyncCheckBadCmd, + SyncCheckpointCmd, }, } -var syncStatusCmd = &cli.Command{ +var SyncStatusCmd = &cli.Command{ Name: "status", Usage: "check sync status", Action: func(cctx *cli.Context) error { @@ -81,7 +81,7 @@ var syncStatusCmd = &cli.Command{ }, } -var syncWaitCmd = &cli.Command{ +var SyncWaitCmd = &cli.Command{ Name: "wait", Usage: "Wait for sync to be complete", Flags: []cli.Flag{ @@ -102,7 +102,7 @@ var syncWaitCmd = &cli.Command{ }, } -var syncMarkBadCmd = &cli.Command{ +var SyncMarkBadCmd = &cli.Command{ Name: "mark-bad", Usage: "Mark the given block as bad, will prevent syncing to a chain that contains it", ArgsUsage: "[blockCid]", @@ -127,7 +127,7 @@ var syncMarkBadCmd = &cli.Command{ }, } -var syncUnmarkBadCmd = &cli.Command{ +var SyncUnmarkBadCmd = &cli.Command{ Name: "unmark-bad", Usage: "Unmark the given block as bad, makes it possible to sync to a chain containing it", Flags: []cli.Flag{ @@ -162,7 +162,7 @@ var syncUnmarkBadCmd = &cli.Command{ }, } -var syncCheckBadCmd = &cli.Command{ +var SyncCheckBadCmd = &cli.Command{ Name: "check-bad", Usage: "check if the given block was marked bad, and for what reason", ArgsUsage: "[blockCid]", @@ -198,7 +198,7 @@ var syncCheckBadCmd = &cli.Command{ }, } -var syncCheckpointCmd = &cli.Command{ +var SyncCheckpointCmd = &cli.Command{ Name: "checkpoint", Usage: "mark a certain tipset as checkpointed; the node will never fork away from this tipset", ArgsUsage: "[tipsetKey]", From 14a809d29126bb901a2c75b7748d921bf3d3b13f Mon Sep 17 00:00:00 2001 From: frrist Date: Tue, 23 Mar 2021 16:25:49 -0700 Subject: [PATCH 06/10] chore: export auth cli command --- cli/auth.go | 10 +++++----- cli/cmd.go | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/auth.go b/cli/auth.go index 2f41b38d1..86958ee43 100644 --- a/cli/auth.go +++ b/cli/auth.go @@ -13,16 +13,16 @@ import ( "github.com/filecoin-project/lotus/node/repo" ) -var authCmd = &cli.Command{ +var AuthCmd = &cli.Command{ Name: "auth", Usage: "Manage RPC permissions", Subcommands: []*cli.Command{ - authCreateAdminToken, - authApiInfoToken, + AuthCreateAdminToken, + AuthApiInfoToken, }, } -var authCreateAdminToken = &cli.Command{ +var AuthCreateAdminToken = &cli.Command{ Name: "create-token", Usage: "Create token", Flags: []cli.Flag{ @@ -70,7 +70,7 @@ var authCreateAdminToken = &cli.Command{ }, } -var authApiInfoToken = &cli.Command{ +var AuthApiInfoToken = &cli.Command{ Name: "api-info", Usage: "Get token with API info required to connect to this node", Flags: []cli.Flag{ diff --git a/cli/cmd.go b/cli/cmd.go index cf0b99c81..1aed6174c 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -57,7 +57,7 @@ var GetWorkerAPI = cliutil.GetWorkerAPI var CommonCommands = []*cli.Command{ NetCmd, - authCmd, + AuthCmd, LogCmd, waitApiCmd, fetchParamCmd, @@ -71,7 +71,7 @@ var Commands = []*cli.Command{ WithCategory("basic", clientCmd), WithCategory("basic", multisigCmd), WithCategory("basic", paychCmd), - WithCategory("developer", authCmd), + WithCategory("developer", AuthCmd), WithCategory("developer", mpoolCmd), WithCategory("developer", StateCmd), WithCategory("developer", ChainCmd), From 1d50cdd85af605888e755344c354dd42e6f98290 Mon Sep 17 00:00:00 2001 From: frrist Date: Tue, 23 Mar 2021 16:26:12 -0700 Subject: [PATCH 07/10] chore: export wait cli command --- cli/cmd.go | 4 ++-- cli/wait.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/cmd.go b/cli/cmd.go index 1aed6174c..ad0545e66 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -59,7 +59,7 @@ var CommonCommands = []*cli.Command{ NetCmd, AuthCmd, LogCmd, - waitApiCmd, + WaitApiCmd, fetchParamCmd, pprofCmd, VersionCmd, @@ -76,7 +76,7 @@ var Commands = []*cli.Command{ WithCategory("developer", StateCmd), WithCategory("developer", ChainCmd), WithCategory("developer", LogCmd), - WithCategory("developer", waitApiCmd), + WithCategory("developer", WaitApiCmd), WithCategory("developer", fetchParamCmd), WithCategory("network", NetCmd), WithCategory("network", SyncCmd), diff --git a/cli/wait.go b/cli/wait.go index ca8cdce3f..98fc9c0d8 100644 --- a/cli/wait.go +++ b/cli/wait.go @@ -7,7 +7,7 @@ import ( "github.com/urfave/cli/v2" ) -var waitApiCmd = &cli.Command{ +var WaitApiCmd = &cli.Command{ Name: "wait-api", Usage: "Wait for lotus api to come online", Action: func(cctx *cli.Context) error { From b34db8e4323243a7b13957a13352accb889d30ed Mon Sep 17 00:00:00 2001 From: frrist Date: Tue, 23 Mar 2021 16:26:59 -0700 Subject: [PATCH 08/10] chore: export pprof cli commands --- cli/cmd.go | 4 ++-- cli/pprof.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/cmd.go b/cli/cmd.go index ad0545e66..819446094 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -61,7 +61,7 @@ var CommonCommands = []*cli.Command{ LogCmd, WaitApiCmd, fetchParamCmd, - pprofCmd, + PprofCmd, VersionCmd, } @@ -80,7 +80,7 @@ var Commands = []*cli.Command{ WithCategory("developer", fetchParamCmd), WithCategory("network", NetCmd), WithCategory("network", SyncCmd), - pprofCmd, + PprofCmd, VersionCmd, } diff --git a/cli/pprof.go b/cli/pprof.go index dccb97f9a..0da245910 100644 --- a/cli/pprof.go +++ b/cli/pprof.go @@ -11,7 +11,7 @@ import ( "github.com/filecoin-project/lotus/node/repo" ) -var pprofCmd = &cli.Command{ +var PprofCmd = &cli.Command{ Name: "pprof", Hidden: true, Subcommands: []*cli.Command{ From a74e02e362a3495161f78ae687a23d6cee8f6c96 Mon Sep 17 00:00:00 2001 From: frrist Date: Tue, 23 Mar 2021 16:27:34 -0700 Subject: [PATCH 09/10] chore: export fetch cli command --- cli/cmd.go | 4 ++-- cli/params.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/cmd.go b/cli/cmd.go index 819446094..0bf6b382d 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -60,7 +60,7 @@ var CommonCommands = []*cli.Command{ AuthCmd, LogCmd, WaitApiCmd, - fetchParamCmd, + FetchParamCmd, PprofCmd, VersionCmd, } @@ -77,7 +77,7 @@ var Commands = []*cli.Command{ WithCategory("developer", ChainCmd), WithCategory("developer", LogCmd), WithCategory("developer", WaitApiCmd), - WithCategory("developer", fetchParamCmd), + WithCategory("developer", FetchParamCmd), WithCategory("network", NetCmd), WithCategory("network", SyncCmd), PprofCmd, diff --git a/cli/params.go b/cli/params.go index 05c0a4cda..8419507b8 100644 --- a/cli/params.go +++ b/cli/params.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/lotus/build" ) -var fetchParamCmd = &cli.Command{ +var FetchParamCmd = &cli.Command{ Name: "fetch-params", Usage: "Fetch proving parameters", ArgsUsage: "[sectorSize]", From bcf7aab55d6283e3260517a5d181503b7deda2cc Mon Sep 17 00:00:00 2001 From: frrist Date: Tue, 23 Mar 2021 16:28:27 -0700 Subject: [PATCH 10/10] chore: export mpool cli commands --- cli/cmd.go | 2 +- cli/mpool.go | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cli/cmd.go b/cli/cmd.go index 0bf6b382d..efbb3b990 100644 --- a/cli/cmd.go +++ b/cli/cmd.go @@ -72,7 +72,7 @@ var Commands = []*cli.Command{ WithCategory("basic", multisigCmd), WithCategory("basic", paychCmd), WithCategory("developer", AuthCmd), - WithCategory("developer", mpoolCmd), + WithCategory("developer", MpoolCmd), WithCategory("developer", StateCmd), WithCategory("developer", ChainCmd), WithCategory("developer", LogCmd), diff --git a/cli/mpool.go b/cli/mpool.go index d74c7c9ba..b5a68860f 100644 --- a/cli/mpool.go +++ b/cli/mpool.go @@ -22,22 +22,22 @@ import ( "github.com/filecoin-project/lotus/node/config" ) -var mpoolCmd = &cli.Command{ +var MpoolCmd = &cli.Command{ Name: "mpool", Usage: "Manage message pool", Subcommands: []*cli.Command{ - mpoolPending, - mpoolClear, - mpoolSub, - mpoolStat, - mpoolReplaceCmd, - mpoolFindCmd, - mpoolConfig, - mpoolGasPerfCmd, + MpoolPending, + MpoolClear, + MpoolSub, + MpoolStat, + MpoolReplaceCmd, + MpoolFindCmd, + MpoolConfig, + MpoolGasPerfCmd, }, } -var mpoolPending = &cli.Command{ +var MpoolPending = &cli.Command{ Name: "pending", Usage: "Get pending messages", Flags: []cli.Flag{ @@ -132,7 +132,7 @@ var mpoolPending = &cli.Command{ }, } -var mpoolClear = &cli.Command{ +var MpoolClear = &cli.Command{ Name: "clear", Usage: "Clear all pending messages from the mpool (USE WITH CARE)", Flags: []cli.Flag{ @@ -165,7 +165,7 @@ var mpoolClear = &cli.Command{ }, } -var mpoolSub = &cli.Command{ +var MpoolSub = &cli.Command{ Name: "sub", Usage: "Subscribe to mpool changes", Action: func(cctx *cli.Context) error { @@ -197,7 +197,7 @@ var mpoolSub = &cli.Command{ }, } -var mpoolStat = &cli.Command{ +var MpoolStat = &cli.Command{ Name: "stat", Usage: "print mempool stats", Flags: []cli.Flag{ @@ -356,7 +356,7 @@ var mpoolStat = &cli.Command{ }, } -var mpoolReplaceCmd = &cli.Command{ +var MpoolReplaceCmd = &cli.Command{ Name: "replace", Usage: "replace a message in the mempool", Flags: []cli.Flag{ @@ -509,7 +509,7 @@ var mpoolReplaceCmd = &cli.Command{ }, } -var mpoolFindCmd = &cli.Command{ +var MpoolFindCmd = &cli.Command{ Name: "find", Usage: "find a message in the mempool", Flags: []cli.Flag{ @@ -592,7 +592,7 @@ var mpoolFindCmd = &cli.Command{ }, } -var mpoolConfig = &cli.Command{ +var MpoolConfig = &cli.Command{ Name: "config", Usage: "get or set current mpool configuration", ArgsUsage: "[new-config]", @@ -637,7 +637,7 @@ var mpoolConfig = &cli.Command{ }, } -var mpoolGasPerfCmd = &cli.Command{ +var MpoolGasPerfCmd = &cli.Command{ Name: "gas-perf", Usage: "Check gas performance of messages in mempool", Flags: []cli.Flag{