Restrict lifetime of ReserveDestination to CWallet::CreateTransaction
This commit is contained in:
1 parent
d9ff862f2d
commit
e10e1e8db0
6 files changed
+19
-27
No files matched your search
@@ -361,17 +361,16 @@ public:
|
||||
CWalletTx& AddTx(CRecipient recipient)
|
||||
{
|
||||
CTransactionRef tx;
|
||||
ReserveDestination reservedest(wallet.get());
|
||||
CAmount fee;
|
||||
int changePos = -1;
|
||||
std::string error;
|
||||
CCoinControl dummy;
|
||||
{
|
||||
auto locked_chain = m_chain->lock();
|
||||
BOOST_CHECK(wallet->CreateTransaction(*locked_chain, {recipient}, tx, reservedest, fee, changePos, error, dummy));
|
||||
BOOST_CHECK(wallet->CreateTransaction(*locked_chain, {recipient}, tx, fee, changePos, error, dummy));
|
||||
}
|
||||
CValidationState state;
|
||||
BOOST_CHECK(wallet->CommitTransaction(tx, {}, {}, reservedest, state));
|
||||
BOOST_CHECK(wallet->CommitTransaction(tx, {}, {}, state));
|
||||
CMutableTransaction blocktx;
|
||||
{
|
||||
LOCK(wallet->cs_wallet);
|
||||
|
||||
Reference in new issue
Block a user