diff options
author | Jaquee <jaquee.monero@gmail.com> | 2017-01-12 18:23:23 +0100 |
---|---|---|
committer | Jaquee <jaquee.monero@gmail.com> | 2017-01-12 18:25:34 +0100 |
commit | db56a03ff2820f85da21c3c8fc4cc60e64c5b88d (patch) | |
tree | b6e8c3a583171deb841ab0366f977be833bcc8e4 /src/wallet/wallet2.cpp | |
parent | Merge pull request #1542 (diff) | |
download | monero-db56a03ff2820f85da21c3c8fc4cc60e64c5b88d.tar.xz |
Wallet2 + API: Callbacks for unconfirmed transfers
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 1550787e5..7578295d1 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1004,8 +1004,11 @@ void wallet2::process_new_transaction(const cryptonote::transaction& tx, const s payment.m_block_height = height; payment.m_unlock_time = tx.unlock_time; payment.m_timestamp = ts; - if (pool) + if (pool) { m_unconfirmed_payments.emplace(payment_id, payment); + if (0 != m_callback) + m_callback->on_unconfirmed_money_received(height, tx, payment.m_amount); + } else m_payments.emplace(payment_id, payment); LOG_PRINT_L2("Payment found in " << (pool ? "pool" : "block") << ": " << payment_id << " / " << payment.m_tx_hash << " / " << payment.m_amount); |