unlocking coinbase

- extract accounts.getKey method - if given empty address it retrieves coinbase (first account)
- cli -unlock coinbase will unlock coinbase
This commit is contained in:
zelig
2015-03-24 12:37:00 +00:00
parent 859f1f08ca
commit fd8d18ec28
2 changed files with 17 additions and 3 deletions

View File

@ -134,7 +134,7 @@ Exports the given account's private key into keyfile using the canonical EC form
The account needs to be unlocked, if it is not the user is prompted for a passphrase to unlock it.
For non-interactive use, the password can be specified with the --unlock flag:
ethereum --unlock <passwrdfile> account export <address> <keyfile>
ethereum --password <passwrdfile> account export <address> <keyfile>
Note:
Since you can directly copy your encrypted accounts to another ethereum instance, this import/export mechanism is not needed when you transfer an account between nodes.
@ -305,6 +305,9 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) {
account := ctx.GlobalString(utils.UnlockedAccountFlag.Name)
if len(account) > 0 {
if account == "coinbase" {
account = ""
}
unlockAccount(ctx, am, account)
}
// Start auxiliary services if enabled.