diff --git a/cli/vm/cli.go b/cli/vm/cli.go index 6c68ae988..69456ea86 100644 --- a/cli/vm/cli.go +++ b/cli/vm/cli.go @@ -354,15 +354,15 @@ var ( ErrInvalidParameter = errors.New("can't parse argument") ) -// VMCLI object for interacting with the VM. -type VMCLI struct { +// CLI object for interacting with the VM. +type CLI struct { chain *core.Blockchain shell *cli.App } -// NewWithConfig returns new VMCLI instance using provided config and (optionally) +// NewWithConfig returns new CLI instance using provided config and (optionally) // provided node config for state-backed VM. -func NewWithConfig(printLogotype bool, onExit func(int), c *readline.Config, cfg config.Config) (*VMCLI, error) { +func NewWithConfig(printLogotype bool, onExit func(int), c *readline.Config, cfg config.Config) (*CLI, error) { if c.AutoComplete == nil { // Autocomplete commands/flags on TAB. c.AutoComplete = completer @@ -426,7 +426,7 @@ func NewWithConfig(printLogotype bool, onExit func(int), c *readline.Config, cfg return nil, cli.NewExitError(fmt.Errorf("failed to create test VM: %w", err), 1) } - vmcli := VMCLI{ + vmcli := CLI{ chain: chain, shell: ctl, } @@ -1063,7 +1063,7 @@ func dumpEvents(app *cli.App) (string, error) { } // Run waits for user input from Stdin and executes the passed command. -func (c *VMCLI) Run() error { +func (c *CLI) Run() error { if getPrintLogoFromContext(c.shell) { printLogo(c.shell.Writer) } diff --git a/cli/vm/cli_test.go b/cli/vm/cli_test.go index 9fe83906d..7bfe9d54a 100644 --- a/cli/vm/cli_test.go +++ b/cli/vm/cli_test.go @@ -62,7 +62,7 @@ func (r *readCloser) WriteString(s string) { type executor struct { in *readCloser out *bytes.Buffer - cli *VMCLI + cli *CLI ch chan struct{} exit atomic.Bool } @@ -126,7 +126,7 @@ func newTestVMClIWithState(t *testing.T) *executor { basicchain.InitSimple(t, "../../", e) bc.Close() - // After that create VMCLI backed by created chain. + // After that create CLI backed by created chain. configPath := "../../config/protocol.unit_testnet.yml" cfg, err := config.LoadFile(configPath) require.NoError(t, err)