Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | wallet->LoadWallet(firstRun); | ||||
LOCK(wallet->cs_wallet); | LOCK(wallet->cs_wallet); | ||||
wallet->SetAddressBook( | wallet->SetAddressBook( | ||||
GetDestinationForKey(test.coinbaseKey.GetPubKey(), | GetDestinationForKey(test.coinbaseKey.GetPubKey(), | ||||
wallet->m_default_address_type), | wallet->m_default_address_type), | ||||
"", "receive"); | "", "receive"); | ||||
wallet->AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey()); | wallet->AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey()); | ||||
} | } | ||||
{ | { | ||||
LOCK(cs_main); | auto locked_chain = wallet->chain().lock(); | ||||
WalletRescanReserver reserver(wallet.get()); | WalletRescanReserver reserver(wallet.get()); | ||||
reserver.reserve(); | reserver.reserve(); | ||||
wallet->ScanForWalletTransactions(chainActive.Genesis(), nullptr, | wallet->ScanForWalletTransactions(chainActive.Genesis(), nullptr, | ||||
reserver, true); | reserver, true); | ||||
} | } | ||||
wallet->SetBroadcastTransactions(true); | wallet->SetBroadcastTransactions(true); | ||||
// Create widgets for sending coins and listing transactions. | // Create widgets for sending coins and listing transactions. | ||||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |