diff options
author | obscuren <geffobscura@gmail.com> | 2015-06-04 22:52:23 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-06-05 01:28:39 +0800 |
commit | 0f51ee6c88f0697cec368d6e2c88b35cc173e37a (patch) | |
tree | 0aae35efd25eed2f9c1486e648db33359ae2ff07 /core | |
parent | dcdb4554d7f7ea3e96fec57805f0ea1042d0abc7 (diff) | |
download | go-tangerine-0f51ee6c88f0697cec368d6e2c88b35cc173e37a.tar go-tangerine-0f51ee6c88f0697cec368d6e2c88b35cc173e37a.tar.gz go-tangerine-0f51ee6c88f0697cec368d6e2c88b35cc173e37a.tar.bz2 go-tangerine-0f51ee6c88f0697cec368d6e2c88b35cc173e37a.tar.lz go-tangerine-0f51ee6c88f0697cec368d6e2c88b35cc173e37a.tar.xz go-tangerine-0f51ee6c88f0697cec368d6e2c88b35cc173e37a.tar.zst go-tangerine-0f51ee6c88f0697cec368d6e2c88b35cc173e37a.zip |
crypto: return common.Address rather than raw bytes
Diffstat (limited to 'core')
-rw-r--r-- | core/types/transaction_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/types/transaction_test.go b/core/types/transaction_test.go index dada424e9..492059c28 100644 --- a/core/types/transaction_test.go +++ b/core/types/transaction_test.go @@ -64,7 +64,7 @@ func decodeTx(data []byte) (*Transaction, error) { return &tx, rlp.Decode(bytes.NewReader(data), &tx) } -func defaultTestKey() (*ecdsa.PrivateKey, []byte) { +func defaultTestKey() (*ecdsa.PrivateKey, common.Address) { key := crypto.ToECDSA(common.Hex2Bytes("45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8")) addr := crypto.PubkeyToAddress(key.PublicKey) return key, addr @@ -85,7 +85,7 @@ func TestRecipientEmpty(t *testing.T) { t.FailNow() } - if !bytes.Equal(addr, from.Bytes()) { + if addr != from { t.Error("derived address doesn't match") } } @@ -105,7 +105,7 @@ func TestRecipientNormal(t *testing.T) { t.FailNow() } - if !bytes.Equal(addr, from.Bytes()) { + if addr != from { t.Error("derived address doesn't match") } } |