accounts, cmd, eth, internal, mobile, node: split account backends

This commit is contained in:
Péter Szilágyi
2017-01-24 11:49:20 +02:00
parent 564b60520c
commit 833e4d1319
47 changed files with 1068 additions and 688 deletions

View File

@ -25,6 +25,7 @@ import (
"strings"
"time"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/console"
@ -245,12 +246,13 @@ func startNode(ctx *cli.Context, stack *node.Node) {
utils.StartNode(stack)
// Unlock any account specifically requested
accman := stack.AccountManager()
ks := stack.AccountManager().Backend(keystore.BackendType).(*keystore.KeyStore)
passwords := utils.MakePasswordList(ctx)
accounts := strings.Split(ctx.GlobalString(utils.UnlockedAccountFlag.Name), ",")
for i, account := range accounts {
if trimmed := strings.TrimSpace(account); trimmed != "" {
unlockAccount(ctx, accman, trimmed, i, passwords)
unlockAccount(ctx, ks, trimmed, i, passwords)
}
}
// Start auxiliary services if enabled