settable etherbase

- etherbase flag for block reward destination
- coinbase => etherbase
- CLI- eth Config -> eth, xeth -> RPC / Miner
- use primary instead of coinbase as the unlock magic wildcard
- accounts: firstAddr/Coinbase -> Primary
This commit is contained in:
zelig
2015-03-26 21:49:22 +00:00
parent b0b0939879
commit b375bbee5f
5 changed files with 37 additions and 18 deletions

View File

@ -81,13 +81,7 @@ func (am *Manager) HasAccount(addr []byte) bool {
return false
}
// Coinbase returns the account address that mining rewards are sent to.
func (am *Manager) Coinbase() (addr []byte, err error) {
// TODO: persist coinbase address on disk
return am.firstAddr()
}
func (am *Manager) firstAddr() ([]byte, error) {
func (am *Manager) Primary() (addr []byte, err error) {
addrs, err := am.keyStore.GetKeyAddresses()
if os.IsNotExist(err) {
return nil, ErrNoKeys