aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/hd_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-08-09 17:51:16 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-08-09 18:26:07 +0800
commit5d9ac49c7e6027c60998a56287dbb3e407011c9b (patch)
tree325712b0955076ba81a91031e84f25dee88727b2 /accounts/hd_test.go
parentdb568a61e2a98880ab308bf2224aa34073dc7f39 (diff)
downloadgo-tangerine-5d9ac49c7e6027c60998a56287dbb3e407011c9b.tar
go-tangerine-5d9ac49c7e6027c60998a56287dbb3e407011c9b.tar.gz
go-tangerine-5d9ac49c7e6027c60998a56287dbb3e407011c9b.tar.bz2
go-tangerine-5d9ac49c7e6027c60998a56287dbb3e407011c9b.tar.lz
go-tangerine-5d9ac49c7e6027c60998a56287dbb3e407011c9b.tar.xz
go-tangerine-5d9ac49c7e6027c60998a56287dbb3e407011c9b.tar.zst
go-tangerine-5d9ac49c7e6027c60998a56287dbb3e407011c9b.zip
accounts: refactor API for generalized USB wallets
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}},