Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/wallet_tests.cpp
Show First 20 Lines • Show All 481 Lines • ▼ Show 20 Lines | CWalletTx &AddTx(CRecipient recipient) { | ||||
std::string error; | std::string error; | ||||
CCoinControl dummy; | CCoinControl dummy; | ||||
{ | { | ||||
auto locked_chain = m_chain->lock(); | auto locked_chain = m_chain->lock(); | ||||
BOOST_CHECK(wallet->CreateTransaction( | BOOST_CHECK(wallet->CreateTransaction( | ||||
*locked_chain, {recipient}, tx, fee, changePos, error, dummy)); | *locked_chain, {recipient}, tx, fee, changePos, error, dummy)); | ||||
} | } | ||||
TxValidationState state; | TxValidationState state; | ||||
BOOST_CHECK(wallet->CommitTransaction(tx, {}, {}, state)); | wallet->CommitTransaction(tx, {}, {}, 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 99 Lines • Show Last 20 Lines |