diff --git a/src/gethdep.go b/src/gethdep.go index 63f7f8707..e18df8675 100644 --- a/src/gethdep.go +++ b/src/gethdep.go @@ -82,7 +82,7 @@ func createAccount(password string) (string, string, string, error) { return "", "", "", errors.New("No running node detected for account creation") } -func remindAccountDetails(password, mnemonic string) (string, string, error) { +func recoverAccount(password, mnemonic string) (string, string, error) { if currentNode != nil { diff --git a/src/gethdep_test.go b/src/gethdep_test.go index 62951a089..da926daa9 100644 --- a/src/gethdep_test.go +++ b/src/gethdep_test.go @@ -33,7 +33,7 @@ const ( whisperMessage5 = "test message 5 (K2 -> K1)" ) -func TestRemindAccountDetails(t *testing.T) { +func TestRecoverAccount(t *testing.T) { err := prepareTestNode() if err != nil { t.Error(err) @@ -48,14 +48,14 @@ func TestRemindAccountDetails(t *testing.T) { } glog.V(logger.Info).Infof("Account created: {address: %s, key: %s, mnemonic:%s}", address, pubKey, mnemonic) - // try reminding using password + mnemonic - addressCheck, pubKeyCheck, err := remindAccountDetails(newAccountPassword, mnemonic) + // try recovering using password + mnemonic + addressCheck, pubKeyCheck, err := recoverAccount(newAccountPassword, mnemonic) if err != nil { - t.Errorf("remind details failed: %v", err) + t.Errorf("recover account failed: %v", err) return } if address != addressCheck || pubKey != pubKeyCheck { - t.Error("Test failed: remind account details failed to pull the correct details") + t.Error("Test failed: recover account details failed to pull the correct details") } } diff --git a/src/library.go b/src/library.go index 6118029c4..0729a2a1c 100644 --- a/src/library.go +++ b/src/library.go @@ -34,10 +34,10 @@ func CreateAccount(password *C.char) *C.char { return C.CString(string(outBytes)) } -//export RemindAccountDetails -func RemindAccountDetails(password, mnemonic *C.char) *C.char { +//export RecoverAccount +func RecoverAccount(password, mnemonic *C.char) *C.char { - address, pubKey, err := remindAccountDetails(C.GoString(password), C.GoString(mnemonic)) + address, pubKey, err := recoverAccount(C.GoString(password), C.GoString(mnemonic)) errString := emptyError if err != nil {