Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 移除已失效命令 / remove unused cmds and dead code #5314

Merged
merged 1 commit into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions cmd/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ var defaultAddressCmd = &cmds.Command{
}

var setDefaultAddressCmd = &cmds.Command{
Extra: AdminExtra,
Arguments: []cmds.Argument{
cmds.StringArg("address", true, false, "address to set default for"),
},
Expand Down Expand Up @@ -232,7 +231,6 @@ type WalletSerializeResult struct {
}

var walletImportCmd = &cmds.Command{
Extra: AdminExtra,
Arguments: []cmds.Argument{
cmds.FileArg("walletFile", true, false, "File containing wallet data to import").EnableStdin(),
},
Expand Down Expand Up @@ -270,7 +268,6 @@ var walletImportCmd = &cmds.Command{

var (
walletExportCmd = &cmds.Command{
Extra: AdminExtra,
Arguments: []cmds.Argument{
cmds.StringArg("addr", true, true, "address of key to export"),
cmds.StringArg("password", false, false, "Password to be locked"),
Expand Down
13 changes: 0 additions & 13 deletions cmd/commands_test.go

This file was deleted.

33 changes: 0 additions & 33 deletions cmd/errors.go

This file was deleted.

5 changes: 1 addition & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ START RUNNING VENUS
VIEW DATA STRUCTURES
chain - Inspect the filecoin blockchain
sync - Inspect the filecoin Sync
dag - Interact with IPLD DAG objects
show - Get human-readable representations of filecoin objects

NETWORK COMMANDS
swarm - Interact with the swarm
Expand Down Expand Up @@ -177,7 +175,6 @@ var rootSubcmdsDaemon = map[string]*cmds.Command{
"log": logCmd,
"send": msgSendCmd,
"mpool": mpoolCmd,
"show": showCmd,
"swarm": swarmCmd,
"wallet": walletCmd,
"version": versionCmd,
Expand Down Expand Up @@ -245,7 +242,7 @@ func makeExecutor(req *cmds.Request, env interface{}) (cmds.Executor, error) {
}
}
if apiInfo == nil && isDaemonRequired {
return nil, ErrMissingDaemon
return nil, fmt.Errorf("daemon must be started before using this command")
}
if apiInfo == nil {
apiInfo = &APIInfo{}
Expand Down
3 changes: 2 additions & 1 deletion cmd/message_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ func TestMessageSendBlockGasLimit(t *testing.T) {
builder := test.NewNodeBuilder(t)
defaultAddr := fortest.TestAddresses[0]

buildWithMiner(t, builder)
cs := test.FixtureChainSeed(t)
builder.WithGenesisInit(cs.GenesisInitFunc)
builder.WithConfig(test.DefaultAddressConfigOpt(defaultAddr))
_, cmdClient, done := builder.BuildAndStartAPI(ctx)
defer done()
Expand Down
10 changes: 0 additions & 10 deletions cmd/permission.go

This file was deleted.

74 changes: 0 additions & 74 deletions cmd/show.go

This file was deleted.

Loading