update sample code with outputs is_confirmed, is_locked

set m_is_confirmed, m_is_unlocked in output notifications
This commit is contained in:
woodser
2021-01-11 21:37:28 -05:00
parent e313fe52d9
commit f0d5bd5e4b
3 changed files with 23 additions and 1 deletions
+5 -1
View File
@@ -774,6 +774,7 @@ namespace monero {
// create library tx
std::shared_ptr<monero_tx_wallet> tx = std::static_pointer_cast<monero_tx_wallet>(monero_utils::cn_tx_to_tx(cn_tx, true));
tx->m_hash = epee::string_tools::pod_to_hex(txid);
tx->m_is_confirmed = false;
tx->m_is_locked = true;
std::shared_ptr<monero_output_wallet> output = std::make_shared<monero_output_wallet>();
tx->m_outputs.push_back(output);
@@ -810,8 +811,9 @@ namespace monero {
block->m_txs.push_back(tx);
tx->m_block = block;
tx->m_hash = epee::string_tools::pod_to_hex(txid);
tx->m_unlock_height = unlock_height;
tx->m_is_confirmed = true;\
tx->m_is_locked = true;
tx->m_unlock_height = unlock_height;
std::shared_ptr<monero_output_wallet> output = std::make_shared<monero_output_wallet>();
tx->m_outputs.push_back(output);
output->m_tx = tx;
@@ -849,6 +851,8 @@ namespace monero {
block->m_txs.push_back(tx);
tx->m_block = block;
tx->m_hash = epee::string_tools::pod_to_hex(txid);
tx->m_is_confirmed = true;
tx->m_is_locked = true;
std::shared_ptr<monero_output_wallet> output = std::make_shared<monero_output_wallet>();
tx->m_inputs.push_back(output);
output->m_tx = tx;