From c7ab3e5544a3293819957281ecb7cfc08b4e9813 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 10 Apr 2018 13:12:07 +0200 Subject: common: delete StringToAddress, StringToHash (#16436) * common: delete StringToAddress, StringToHash These functions are confusing because they don't parse hex, but use the bytes of the string. This change removes them, replacing all uses of StringToAddress(s) by BytesToAddress([]byte(s)). * eth/filters: remove incorrect use of common.BytesToAddress --- eth/filters/api_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'eth/filters/api_test.go') diff --git a/eth/filters/api_test.go b/eth/filters/api_test.go index 4ae37f977..02229a754 100644 --- a/eth/filters/api_test.go +++ b/eth/filters/api_test.go @@ -29,8 +29,8 @@ func TestUnmarshalJSONNewFilterArgs(t *testing.T) { var ( fromBlock rpc.BlockNumber = 0x123435 toBlock rpc.BlockNumber = 0xabcdef - address0 = common.StringToAddress("70c87d191324e6712a591f304b4eedef6ad9bb9d") - address1 = common.StringToAddress("9b2055d370f73ec7d8a03e965129118dc8f5bf83") + address0 = common.HexToAddress("70c87d191324e6712a591f304b4eedef6ad9bb9d") + address1 = common.HexToAddress("9b2055d370f73ec7d8a03e965129118dc8f5bf83") topic0 = common.HexToHash("3ac225168df54212a25c1c01fd35bebfea408fdac2e31ddd6f80a4bbf9a5f1ca") topic1 = common.HexToHash("9084a792d2f8b16a62b882fd56f7860c07bf5fa91dd8a2ae7e809e5180fef0b3") topic2 = common.HexToHash("6ccae1c4af4152f460ff510e573399795dfab5dcf1fa60d1f33ac8fdc1e480ce") -- cgit v1.2.3