aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/hd_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-08-14 23:52:40 +0800
committerGitHub <noreply@github.com>2017-08-14 23:52:40 +0800
commitef0edc6e32d98d2fca54076f38cb317f43704900 (patch)
tree3c110e3aa936721d90537074ea187cbfb5f5991c /accounts/hd_test.go
parent6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f (diff)
parent02656f9f614374b3f30b0cc57562e31c570cdf3d (diff)
downloaddexon-ef0edc6e32d98d2fca54076f38cb317f43704900.tar
dexon-ef0edc6e32d98d2fca54076f38cb317f43704900.tar.gz
dexon-ef0edc6e32d98d2fca54076f38cb317f43704900.tar.bz2
dexon-ef0edc6e32d98d2fca54076f38cb317f43704900.tar.lz
dexon-ef0edc6e32d98d2fca54076f38cb317f43704900.tar.xz
dexon-ef0edc6e32d98d2fca54076f38cb317f43704900.tar.zst
dexon-ef0edc6e32d98d2fca54076f38cb317f43704900.zip
Merge pull request #14885 from karalabe/trezor-boom
accounts, console, internal: support trezor hardware wallet
Diffstat (limited to 'accounts/hd_test.go')
-rw-r--r--accounts/hd_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/accounts/hd_test.go b/accounts/hd_test.go
index 83ec34adb..b6b23230d 100644
--- a/accounts/hd_test.go
+++ b/accounts/hd_test.go
@@ -37,11 +37,11 @@ func TestHDPathParsing(t *testing.T) {
{"m/2147483692/2147483708/2147483648/2147483648", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0x80000000 + 0}},
// Plain relative derivation paths
- {"0", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0}},
- {"128", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 128}},
- {"0'", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0x80000000 + 0}},
- {"128'", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0x80000000 + 128}},
- {"2147483648", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0x80000000 + 0}},
+ {"0", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 0}},
+ {"128", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 128}},
+ {"0'", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 0x80000000 + 0}},
+ {"128'", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 0x80000000 + 128}},
+ {"2147483648", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 0x80000000 + 0}},
// Hexadecimal absolute derivation paths
{"m/0x2C'/0x3c'/0x00'/0x00", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0}},
@@ -52,11 +52,11 @@ func TestHDPathParsing(t *testing.T) {
{"m/0x8000002C/0x8000003c/0x80000000/0x80000000", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0x80000000 + 0}},
// Hexadecimal relative derivation paths
- {"0x00", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0}},
- {"0x80", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 128}},
- {"0x00'", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0x80000000 + 0}},
- {"0x80'", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0x80000000 + 128}},
- {"0x80000000", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0x80000000 + 0}},
+ {"0x00", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 0}},
+ {"0x80", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 128}},
+ {"0x00'", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 0x80000000 + 0}},
+ {"0x80'", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 0x80000000 + 128}},
+ {"0x80000000", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 0x80000000 + 0}},
// Weird inputs just to ensure they work
{" m / 44 '\n/\n 60 \n\n\t' /\n0 ' /\t\t 0", DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0}},