sample code compiling with set_listener

This commit is contained in:
woodser
2019-08-09 12:07:36 -04:00
parent fa2283c30e
commit 622619891f
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ int main(int argc, const char* argv[]) {
bool is_synced = wallet_random->is_synced();
// be notified when the wallet receives funds
class : monero_wallet_listener {
struct : monero_wallet_listener {
void on_output_received(const monero_output_wallet& output) {
cout << "Wallet received funds!" << endl;
int account_index = output.m_account_index.get();
@@ -81,7 +81,7 @@ int main(int argc, const char* argv[]) {
shared_ptr<monero_key_image> key_image = output.m_key_image.get();
}
} my_listener;
//wallet_random->set_listener(&my_listener);
wallet_random->set_listener(my_listener);
// TODO: define wallet send convenience methods
// // send funds from the restored wallet to the random wallet