Investigating LoadKeysIncompat x3

This commit is contained in:
Haris Khan
2024-09-15 11:28:47 -04:00
parent 4004d3050d
commit d362997650

View File

@ -186,8 +186,8 @@ func Test_KeyGenerationAndHandling(t *testing.T) {
_ = public
//FORMAT TO LOAD: (Address, Both)
vappe := addr.String() + "\n" + both
r := strings.NewReader(vappe)
addrload := addr.String() + "\n" + both
r := strings.NewReader(addrload)
loadedKeys, err := LoadKeysIncompat(r)
if err != nil {
t.Fatalf("LoadKeysIncompat failed: %v", err)
@ -195,12 +195,12 @@ func Test_KeyGenerationAndHandling(t *testing.T) {
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)))
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 {
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)
}
})