mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Get rid of PendingWalletTx class.
No reason for this class to exist if it doesn't have any code to run in the
destructor. e10e1e8db0 from
https://github.com/bitcoin/bitcoin/pull/16208 recently removed code destructor
code that would return an unused key if the transaction wasn't committed.
This commit is contained in:
@@ -261,11 +261,11 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
|
||||
|
||||
auto& newTx = transaction.getWtx();
|
||||
std::string rejectReason;
|
||||
if (!newTx->commit({} /* mapValue */, std::move(vOrderForm), rejectReason))
|
||||
if (!wallet().commitTransaction(newTx, {} /* mapValue */, std::move(vOrderForm), rejectReason))
|
||||
return SendCoinsReturn(TransactionCommitFailed, QString::fromStdString(rejectReason));
|
||||
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ssTx << newTx->get();
|
||||
ssTx << *newTx;
|
||||
transaction_array.append(&(ssTx[0]), ssTx.size());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user