mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
wallet: CreateTransaction(): return out-params as (optional) struct
This commit is contained in:
@@ -257,13 +257,14 @@ public:
|
||||
bilingual_str& fail_reason) override
|
||||
{
|
||||
LOCK(m_wallet->cs_wallet);
|
||||
CTransactionRef tx;
|
||||
FeeCalculation fee_calc_out;
|
||||
if (!CreateTransaction(*m_wallet, recipients, tx, fee, change_pos,
|
||||
fail_reason, coin_control, fee_calc_out, sign)) {
|
||||
return {};
|
||||
}
|
||||
return tx;
|
||||
std::optional<CreatedTransactionResult> txr = CreateTransaction(*m_wallet, recipients, change_pos,
|
||||
fail_reason, coin_control, fee_calc_out, sign);
|
||||
if (!txr) return {};
|
||||
fee = txr->fee;
|
||||
change_pos = txr->change_pos;
|
||||
|
||||
return txr->tx;
|
||||
}
|
||||
void commitTransaction(CTransactionRef tx,
|
||||
WalletValueMap value_map,
|
||||
|
||||
Reference in New Issue
Block a user