Investigating LoadKeysIncompat x3
This commit is contained in:
@ -186,8 +186,8 @@ func Test_KeyGenerationAndHandling(t *testing.T) {
|
|||||||
_ = public
|
_ = public
|
||||||
|
|
||||||
//FORMAT TO LOAD: (Address, Both)
|
//FORMAT TO LOAD: (Address, Both)
|
||||||
vappe := addr.String() + "\n" + both
|
addrload := addr.String() + "\n" + both
|
||||||
r := strings.NewReader(vappe)
|
r := strings.NewReader(addrload)
|
||||||
loadedKeys, err := LoadKeysIncompat(r)
|
loadedKeys, err := LoadKeysIncompat(r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("LoadKeysIncompat failed: %v", err)
|
t.Fatalf("LoadKeysIncompat failed: %v", err)
|
||||||
@ -195,12 +195,12 @@ func Test_KeyGenerationAndHandling(t *testing.T) {
|
|||||||
|
|
||||||
if loadedKeys.Address != keys.Address {
|
if loadedKeys.Address != keys.Address {
|
||||||
//fmt.Printf("loadedKeys.Address md5hash: '%s'\n keys.Address md5hash: '%s'\n", getMD5Hash(string(loadedKeys.Address)), getMD5Hash(string(keys.Address)))
|
//fmt.Printf("loadedKeys.Address md5hash: '%s'\n keys.Address md5hash: '%s'\n", getMD5Hash(string(loadedKeys.Address)), getMD5Hash(string(keys.Address)))
|
||||||
t.Errorf("LoadKeysIncompat returned incorrect public key. Got '%s', want '%s'", loadedKeys.Address, keys.Address)
|
t.Errorf("LoadKeysIncompat returned incorrect address. Got '%s', want '%s'", loadedKeys.Address, keys.Address)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if loadedKeys.Both != keys.Both {
|
if loadedKeys.Both != keys.Both {
|
||||||
t.Errorf("LoadKeysIncompat returned incorrect private key. Got '%s'\nwant '%s'", loadedKeys.Both, keys.Both)
|
t.Errorf("LoadKeysIncompat returned incorrect pair. Got '%s'\nwant '%s'", loadedKeys.Both, keys.Both)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user