Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/wallet.cpp
Show First 20 Lines • Show All 222 Lines • ▼ Show 20 Lines | public: | ||||
CTransactionRef tx; | CTransactionRef tx; | ||||
if (!m_wallet->CreateTransaction(*locked_chain, recipients, tx, fee, | if (!m_wallet->CreateTransaction(*locked_chain, recipients, tx, fee, | ||||
change_pos, fail_reason, | change_pos, fail_reason, | ||||
coin_control, sign)) { | coin_control, sign)) { | ||||
return {}; | return {}; | ||||
} | } | ||||
return tx; | return tx; | ||||
} | } | ||||
bool commitTransaction(CTransactionRef tx, WalletValueMap value_map, | void commitTransaction(CTransactionRef tx, WalletValueMap value_map, | ||||
WalletOrderForm order_form, | WalletOrderForm order_form) override { | ||||
std::string &reject_reason) override { | |||||
auto locked_chain = m_wallet->chain().lock(); | auto locked_chain = m_wallet->chain().lock(); | ||||
LOCK(m_wallet->cs_wallet); | LOCK(m_wallet->cs_wallet); | ||||
TxValidationState state; | TxValidationState state; | ||||
if (!m_wallet->CommitTransaction(std::move(tx), | m_wallet->CommitTransaction(std::move(tx), std::move(value_map), | ||||
std::move(value_map), | std::move(order_form), state); | ||||
std::move(order_form), state)) { | |||||
reject_reason = state.GetRejectReason(); | |||||
return false; | |||||
} | |||||
return true; | |||||
} | } | ||||
bool transactionCanBeAbandoned(const TxId &txid) override { | bool transactionCanBeAbandoned(const TxId &txid) override { | ||||
return m_wallet->TransactionCanBeAbandoned(txid); | return m_wallet->TransactionCanBeAbandoned(txid); | ||||
} | } | ||||
bool abandonTransaction(const TxId &txid) override { | bool abandonTransaction(const TxId &txid) override { | ||||
auto locked_chain = m_wallet->chain().lock(); | auto locked_chain = m_wallet->chain().lock(); | ||||
LOCK(m_wallet->cs_wallet); | LOCK(m_wallet->cs_wallet); | ||||
return m_wallet->AbandonTransaction(*locked_chain, txid); | return m_wallet->AbandonTransaction(*locked_chain, txid); | ||||
▲ Show 20 Lines • Show All 266 Lines • Show Last 20 Lines |