Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/wallet_tests.cpp
Show First 20 Lines • Show All 324 Lines • ▼ Show 20 Lines | CWalletTx &AddTx(CRecipient recipient) { | ||||
Amount fee; | Amount fee; | ||||
int changePos = -1; | int changePos = -1; | ||||
std::string error; | std::string error; | ||||
CCoinControl dummy; | CCoinControl dummy; | ||||
BOOST_CHECK(wallet->CreateTransaction(*m_locked_chain, {recipient}, tx, | BOOST_CHECK(wallet->CreateTransaction(*m_locked_chain, {recipient}, tx, | ||||
reservekey, fee, changePos, error, | reservekey, fee, changePos, error, | ||||
dummy)); | dummy)); | ||||
CValidationState state; | CValidationState state; | ||||
BOOST_CHECK(wallet->CommitTransaction(tx, {}, {}, {}, reservekey, | BOOST_CHECK( | ||||
nullptr, state)); | wallet->CommitTransaction(tx, {}, {}, reservekey, nullptr, state)); | ||||
CMutableTransaction blocktx; | CMutableTransaction blocktx; | ||||
{ | { | ||||
LOCK(wallet->cs_wallet); | LOCK(wallet->cs_wallet); | ||||
blocktx = | blocktx = | ||||
CMutableTransaction(*wallet->mapWallet.at(tx->GetId()).tx); | CMutableTransaction(*wallet->mapWallet.at(tx->GetId()).tx); | ||||
} | } | ||||
CreateAndProcessBlock({CMutableTransaction(blocktx)}, | CreateAndProcessBlock({CMutableTransaction(blocktx)}, | ||||
GetScriptForRawPubKey(coinbaseKey.GetPubKey())); | GetScriptForRawPubKey(coinbaseKey.GetPubKey())); | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |