aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2018-04-10 19:12:07 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-04-10 19:12:07 +0800
commitc7ab3e5544a3293819957281ecb7cfc08b4e9813 (patch)
treed1b8c3b8557dbca84b4d1cb6a13d78fb9fe17b86 /eth
parent149f706fdee89877efd6ca6e168a9a20aaf61a0c (diff)
downloaddexon-c7ab3e5544a3293819957281ecb7cfc08b4e9813.tar.gz
dexon-c7ab3e5544a3293819957281ecb7cfc08b4e9813.tar.zst
dexon-c7ab3e5544a3293819957281ecb7cfc08b4e9813.zip
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
Diffstat (limited to 'eth')
-rw-r--r--eth/filters/api_test.go4
1 files changed, 2 insertions, 2 deletions
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")