Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 788 Lines • ▼ Show 20 Lines | private: | ||||
/* Height of last block processed is used by wallet to know depth of | /* Height of last block processed is used by wallet to know depth of | ||||
* transactions without relying on Chain interface beyond asynchronous | * transactions without relying on Chain interface beyond asynchronous | ||||
* updates. For safety, we initialize it to -1. Height is a pointer on | * updates. For safety, we initialize it to -1. Height is a pointer on | ||||
* node's tip and doesn't imply that the wallet has scanned sequentially all | * node's tip and doesn't imply that the wallet has scanned sequentially all | ||||
* blocks up to this one. | * blocks up to this one. | ||||
*/ | */ | ||||
int m_last_block_processed_height GUARDED_BY(cs_wallet) = -1; | int m_last_block_processed_height GUARDED_BY(cs_wallet) = -1; | ||||
bool CreateTransactionInternal(interfaces::Chain::Lock &locked_chain, | bool CreateTransactionInternal(const std::vector<CRecipient> &vecSend, | ||||
const std::vector<CRecipient> &vecSend, | |||||
CTransactionRef &tx, Amount &nFeeRet, | CTransactionRef &tx, Amount &nFeeRet, | ||||
int &nChangePosInOut, bilingual_str &error, | int &nChangePosInOut, bilingual_str &error, | ||||
const CCoinControl &coin_control, bool sign); | const CCoinControl &coin_control, bool sign); | ||||
std::map<OutputType, ScriptPubKeyMan *> m_external_spk_managers; | std::map<OutputType, ScriptPubKeyMan *> m_external_spk_managers; | ||||
std::map<OutputType, ScriptPubKeyMan *> m_internal_spk_managers; | std::map<OutputType, ScriptPubKeyMan *> m_internal_spk_managers; | ||||
// Indexed by a unique identifier produced by each ScriptPubKeyMan using | // Indexed by a unique identifier produced by each ScriptPubKeyMan using | ||||
▲ Show 20 Lines • Show All 299 Lines • ▼ Show 20 Lines | bool SignTransaction(CMutableTransaction &tx) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
/** | /** | ||||
* Create a new transaction paying the recipients with a set of coins | * Create a new transaction paying the recipients with a set of coins | ||||
* selected by SelectCoins(); Also create the change output, when needed | * selected by SelectCoins(); Also create the change output, when needed | ||||
* @note passing nChangePosInOut as -1 will result in setting a random | * @note passing nChangePosInOut as -1 will result in setting a random | ||||
* position | * position | ||||
*/ | */ | ||||
bool CreateTransaction(interfaces::Chain::Lock &locked_chain, | bool CreateTransaction(const std::vector<CRecipient> &vecSend, | ||||
const std::vector<CRecipient> &vecSend, | |||||
CTransactionRef &tx, Amount &nFeeRet, | CTransactionRef &tx, Amount &nFeeRet, | ||||
int &nChangePosInOut, bilingual_str &error, | int &nChangePosInOut, bilingual_str &error, | ||||
const CCoinControl &coin_control, bool sign = true); | const CCoinControl &coin_control, bool sign = true); | ||||
/** | /** | ||||
* Submit the transaction to the node's mempool and then relay to peers. | * Submit the transaction to the node's mempool and then relay to peers. | ||||
* Should be called after CreateTransaction unless you want to abort | * Should be called after CreateTransaction unless you want to abort | ||||
* broadcasting the transaction. | * broadcasting the transaction. | ||||
* | * | ||||
* @param tx[in] The transaction to be broadcast. | * @param tx[in] The transaction to be broadcast. | ||||
* @param mapValue[in] key-values to be set on the transaction. | * @param mapValue[in] key-values to be set on the transaction. | ||||
* @param orderForm[in] BIP 70 / BIP 21 order form details to be set on the | * @param orderForm[in] BIP 70 / BIP 21 order form details to be set on the | ||||
▲ Show 20 Lines • Show All 403 Lines • Show Last 20 Lines |