Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/wallet_tests.cpp
Show First 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | BOOST_FIXTURE_TEST_CASE(importmulti_rescan, TestChain100Setup) { | ||||
// Verify importmulti RPC returns failure for a key whose creation time is | // Verify importmulti RPC returns failure for a key whose creation time is | ||||
// before the missing block, and success for a key whose creation time is | // before the missing block, and success for a key whose creation time is | ||||
// after. | // after. | ||||
{ | { | ||||
std::shared_ptr<CWallet> wallet = | std::shared_ptr<CWallet> wallet = | ||||
std::make_shared<CWallet>(Params(), chain.get(), WalletLocation(), | std::make_shared<CWallet>(Params(), chain.get(), WalletLocation(), | ||||
WalletDatabase::CreateDummy()); | WalletDatabase::CreateDummy()); | ||||
wallet->SetupLegacyScriptPubKeyMan(); | wallet->SetupLegacyScriptPubKeyMan(); | ||||
WITH_LOCK(wallet->cs_wallet, | |||||
wallet->SetLastBlockProcessed(newTip->nHeight, | |||||
newTip->GetBlockHash())); | |||||
AddWallet(wallet); | AddWallet(wallet); | ||||
UniValue keys; | UniValue keys; | ||||
keys.setArray(); | keys.setArray(); | ||||
UniValue key; | UniValue key; | ||||
key.setObject(); | key.setObject(); | ||||
key.pushKV("scriptPubKey", | key.pushKV("scriptPubKey", | ||||
HexStr(GetScriptForRawPubKey(coinbaseKey.GetPubKey()))); | HexStr(GetScriptForRawPubKey(coinbaseKey.GetPubKey()))); | ||||
key.pushKV("timestamp", 0); | key.pushKV("timestamp", 0); | ||||
▲ Show 20 Lines • Show All 472 Lines • Show Last 20 Lines |