aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/accounts_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-03-03 08:09:16 +0800
committerFelix Lange <fjl@twurst.com>2016-04-12 21:58:01 +0800
commit46e8940b19fee9bc21767a1341c382fd9c9d572a (patch)
tree384b700810910857cd40e099aba0d5a525eec066 /accounts/accounts_test.go
parent2dc20963e789c85bcc9170e15c0483e51ca42bfc (diff)
downloadgo-tangerine-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar
go-tangerine-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar.gz
go-tangerine-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar.bz2
go-tangerine-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar.lz
go-tangerine-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar.xz
go-tangerine-46e8940b19fee9bc21767a1341c382fd9c9d572a.tar.zst
go-tangerine-46e8940b19fee9bc21767a1341c382fd9c9d572a.zip
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.
Diffstat (limited to 'accounts/accounts_test.go')
-rw-r--r--accounts/accounts_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/accounts/accounts_test.go b/accounts/accounts_test.go
index 4a1d1b848..0cb87a8f1 100644
--- a/accounts/accounts_test.go
+++ b/accounts/accounts_test.go
@@ -31,7 +31,7 @@ func TestSign(t *testing.T) {
pass := "" // not used but required by API
a1, err := am.NewAccount(pass)
- am.Unlock(a1.Address, "")
+ am.Unlock(a1, "")
_, err = am.Sign(a1, testSigData)
if err != nil {
@@ -53,7 +53,7 @@ func TestTimedUnlock(t *testing.T) {
}
// Signing with passphrase works
- if err = am.TimedUnlock(a1.Address, pass, 100*time.Millisecond); err != nil {
+ if err = am.TimedUnlock(a1, pass, 100*time.Millisecond); err != nil {
t.Fatal(err)
}
@@ -79,7 +79,7 @@ func TestOverrideUnlock(t *testing.T) {
a1, err := am.NewAccount(pass)
// Unlock indefinitely
- if err = am.Unlock(a1.Address, pass); err != nil {
+ if err = am.Unlock(a1, pass); err != nil {
t.Fatal(err)
}
@@ -90,7 +90,7 @@ func TestOverrideUnlock(t *testing.T) {
}
// reset unlock to a shorter period, invalidates the previous unlock
- if err = am.TimedUnlock(a1.Address, pass, 100*time.Millisecond); err != nil {
+ if err = am.TimedUnlock(a1, pass, 100*time.Millisecond); err != nil {
t.Fatal(err)
}
@@ -119,7 +119,7 @@ func TestSignRace(t *testing.T) {
t.Fatal("could not create the test account", err)
}
- if err := am.TimedUnlock(a1.Address, "", 15*time.Millisecond); err != nil {
+ if err := am.TimedUnlock(a1, "", 15*time.Millisecond); err != nil {
t.Fatal("could not unlock the test account", err)
}
end := time.Now().Add(500 * time.Millisecond)