ready to implement save(path, password)

This commit is contained in:
woodser
2019-06-01 10:57:37 -04:00
parent 8aea825701
commit 558c387824
2 changed files with 37 additions and 0 deletions
+16
View File
@@ -160,6 +160,7 @@ namespace monero {
MoneroWallet::~MoneroWallet() {
cout << "~MoneroWallet()" << endl;
close();
}
// TODO: switch this to setDaemonConnection(MoneroDaemonRpc& daemonConnection)
@@ -402,6 +403,21 @@ namespace monero {
return iter == unlockedBalancePerSubaddress.end() ? 0 : iter->second.first;
}
void MoneroWallet::save() {
cout << "save()" << endl;
save(nullptr, nullptr);
}
void MoneroWallet::save(string path, string password) {
cout << "save(" << path << ", " << password << ")" << endl;
throw runtime_error("Not implemented");
}
void MoneroWallet::close() {
cout << "close()" << endl;
throw runtime_error("Not implemented");
}
// ------------------------------- PRIVATE HELPERS ----------------------------
MoneroSyncResult MoneroWallet::syncAux(uint64_t* startHeight, uint64_t* endHeight, MoneroSyncListener* listener) {
+21
View File
@@ -1102,6 +1102,27 @@ namespace monero {
// */
// public void stopMining();
/**
* Re-save the wallet at its current path.
*
* Throws an exception if the wallet was not loaded from a path and has not
* been saved to an explicit path.
*/
void save();
/**
* Save the wallet at the given path.
*
* @param path is the path to save the wallet at
* @param password is the password to encrypt the wallet
*/
void save(string path, string password);
/**
* Close the wallet.
*/
void close();
// --------------------------------- PRIVATE --------------------------------
private: