accounts: streamline API

- Manager.Accounts no longer returns an error.
- Manager methods take Account instead of common.Address.
- All uses of Account with unkeyed fields are converted.
This commit is contained in:
Felix Lange
2016-03-03 01:09:16 +01:00
parent 2dc20963e7
commit 46e8940b19
11 changed files with 79 additions and 144 deletions

View File

@ -61,17 +61,6 @@ type testjethre struct {
client *httpclient.HTTPClient
}
func (self *testjethre) UnlockAccount(acc []byte) bool {
var ethereum *eth.Ethereum
self.stack.Service(&ethereum)
err := ethereum.AccountManager().Unlock(common.BytesToAddress(acc), "")
if err != nil {
panic("unable to unlock")
}
return true
}
// Temporary disabled while natspec hasn't been migrated
//func (self *testjethre) ConfirmTransaction(tx string) bool {
// var ethereum *eth.Ethereum
@ -122,7 +111,7 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *nod
if err != nil {
t.Fatal(err)
}
if err := accman.Unlock(a.Address, ""); err != nil {
if err := accman.Unlock(a, ""); err != nil {
t.Fatal(err)
}
// Start the node and assemble the REPL tester