implemented listener deconstructor

removed getWallet2() method
This commit is contained in:
woodser
2019-05-31 15:00:52 -04:00
parent 376764d6ee
commit 28c053aa97
2 changed files with 6 additions and 10 deletions
+6 -5
View File
@@ -23,11 +23,15 @@ namespace monero {
this->wallet = wallet;
this->wallet2 = wallet2;
this->listener = nullptr;
this->syncStartHeight = nullptr;
this->syncEndHeight = nullptr;
this->syncListener = nullptr;
}
~Wallet2Listener() {
cout << "~Wallet2Listener()" << endl;
delete syncStartHeight;
delete syncEndHeight;
}
void setWalletListener(MoneroWalletListener* listener) {
@@ -36,6 +40,7 @@ namespace monero {
}
void onSyncStart(uint64_t startHeight, MoneroSyncListener* syncListener) {
if (syncStartHeight != nullptr || syncEndHeight != nullptr) throw runtime_error("Sync start or end height should not already be allocated");
syncStartHeight = new uint64_t(startHeight);
syncEndHeight = new uint64_t(wallet->getChainHeight() - 1);
this->syncListener = syncListener;
@@ -157,10 +162,6 @@ namespace monero {
cout << "~MoneroWallet()" << endl;
}
tools::wallet2* MoneroWallet::getWallet2() {
return wallet2.get();
}
// TODO: switch this to setDaemonConnection(MoneroDaemonRpc& daemonConnection)
void MoneroWallet::setDaemonConnection(const string& uri, const string& username, const string& password) {
cout << "setDaemonConnection(" << uri << ", " << username << ", " << password << ")" << endl;
-5
View File
@@ -168,11 +168,6 @@ namespace monero {
*/
~MoneroWallet();
/**
* TODO: remove this.
*/
tools::wallet2* getWallet2();
/**
* Set the wallet's daemon connection.
*