mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
accounts/scwallet: holiman's review feedback
This commit is contained in:
parent
d2ae535bb9
commit
c65f617a0d
4 changed files with 8 additions and 9 deletions
|
|
@ -224,10 +224,9 @@ const testPassphrase = "swarm-test-passphrase"
|
|||
func getTestAccount(t *testing.T, dir string) (conf *node.Config, account accounts.Account) {
|
||||
// create key
|
||||
conf = &node.Config{
|
||||
DataDir: dir,
|
||||
IPCPath: "bzzd.ipc",
|
||||
NoUSB: true,
|
||||
SmartCard: false,
|
||||
DataDir: dir,
|
||||
IPCPath: "bzzd.ipc",
|
||||
NoUSB: true,
|
||||
}
|
||||
n, err := node.New(conf)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ var (
|
|||
}
|
||||
SmartCardFlag = cli.StringFlag{
|
||||
Name: "pcscd-sock",
|
||||
Usage: "Path to the smartcard daemon (pcscd) socket file",
|
||||
Usage: "Path to the smartcard daemon (pcscd) socket file (linux only)",
|
||||
Value: "/run/pcscd/pcscd.comm",
|
||||
}
|
||||
NetworkIdFlag = cli.Uint64Flag{
|
||||
|
|
@ -1160,6 +1160,8 @@ func setSmartCard(ctx *cli.Context, cfg *node.Config) {
|
|||
if fi, err := os.Stat(ctx.GlobalString(SmartCardFlag.Name)); err == nil {
|
||||
cfg.SmartCard = fi.Mode()&os.ModeType == os.ModeSocket
|
||||
}
|
||||
} else {
|
||||
log.Info("Smartcard support disabled on this platform")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,6 @@ func (e *ExecAdapter) NewNode(config *NodeConfig) (Node, error) {
|
|||
conf.Stack.P2P.NoDiscovery = true
|
||||
conf.Stack.P2P.NAT = nil
|
||||
conf.Stack.NoUSB = true
|
||||
conf.Stack.SmartCard = false
|
||||
|
||||
// listen on a localhost port, which we set when we
|
||||
// initialise NodeConfig (usually a random port)
|
||||
|
|
|
|||
|
|
@ -105,9 +105,8 @@ func (s *SimAdapter) NewNode(config *NodeConfig) (Node, error) {
|
|||
Dialer: s,
|
||||
EnableMsgEvents: config.EnableMsgEvents,
|
||||
},
|
||||
NoUSB: true,
|
||||
SmartCard: false,
|
||||
Logger: log.New("node.id", id.String()),
|
||||
NoUSB: true,
|
||||
Logger: log.New("node.id", id.String()),
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Reference in a new issue