cmd/utils: don't enumerate USB unless --usb is set (#22130)

USB enumeration still occured. Make sure it will only occur if --usb is set.
This also deprecates the 'NoUSB' config file option in favor of a new option 'USB'.
This commit is contained in:
Guillaume Ballet
2021-01-13 11:14:36 +01:00
committed by GitHub
parent 93a89b2681
commit c7a6be163f
12 changed files with 21 additions and 23 deletions
-1
View File
@@ -115,7 +115,6 @@ func (e *ExecAdapter) NewNode(config *NodeConfig) (Node, error) {
conf.Stack.P2P.EnableMsgEvents = config.EnableMsgEvents
conf.Stack.P2P.NoDiscovery = true
conf.Stack.P2P.NAT = nil
conf.Stack.NoUSB = true
// Listen on a localhost port, which we set when we
// initialise NodeConfig (usually a random port)
-1
View File
@@ -100,7 +100,6 @@ func (s *SimAdapter) NewNode(config *NodeConfig) (Node, error) {
EnableMsgEvents: config.EnableMsgEvents,
},
ExternalSigner: config.ExternalSigner,
NoUSB: true,
Logger: log.New("node.id", id.String()),
})
if err != nil {