Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | #endif | ||||
g_change_type = OutputType::LEGACY; | g_change_type = OutputType::LEGACY; | ||||
// Set up wallet and chain with 105 blocks (5 mature blocks for spending). | // Set up wallet and chain with 105 blocks (5 mature blocks for spending). | ||||
TestChain100Setup test; | TestChain100Setup test; | ||||
for (int i = 0; i < 5; ++i) { | for (int i = 0; i < 5; ++i) { | ||||
test.CreateAndProcessBlock( | test.CreateAndProcessBlock( | ||||
{}, GetScriptForRawPubKey(test.coinbaseKey.GetPubKey())); | {}, GetScriptForRawPubKey(test.coinbaseKey.GetPubKey())); | ||||
} | } | ||||
CWallet wallet(Params(), "mock", CWalletDBWrapper::CreateMock()); | CWallet wallet(Params(), "mock", WalletDatabase::CreateMock()); | ||||
bool firstRun; | bool firstRun; | ||||
wallet.LoadWallet(firstRun); | wallet.LoadWallet(firstRun); | ||||
{ | { | ||||
LOCK(wallet.cs_wallet); | LOCK(wallet.cs_wallet); | ||||
wallet.SetAddressBook( | wallet.SetAddressBook( | ||||
GetDestinationForKey(test.coinbaseKey.GetPubKey(), g_address_type), | GetDestinationForKey(test.coinbaseKey.GetPubKey(), g_address_type), | ||||
"", "receive"); | "", "receive"); | ||||
wallet.AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey()); | wallet.AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey()); | ||||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |