Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/wallet_tests.cpp
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | BOOST_FIXTURE_TEST_CASE(rescan, TestChain100Setup) { | ||||
} | } | ||||
} | } | ||||
// Verify importwallet RPC starts rescan at earliest block with timestamp | // Verify importwallet RPC starts rescan at earliest block with timestamp | ||||
// greater or equal than key birthday. Previously there was a bug where | // greater or equal than key birthday. Previously there was a bug where | ||||
// importwallet RPC would start the scan at the latest block with timestamp less | // importwallet RPC would start the scan at the latest block with timestamp less | ||||
// than or equal to key birthday. | // than or equal to key birthday. | ||||
BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup) { | BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup) { | ||||
g_address_type = OutputType::DEFAULT; | |||||
g_change_type = OutputType::DEFAULT; | |||||
// Create two blocks with same timestamp to verify that importwallet rescan | // Create two blocks with same timestamp to verify that importwallet rescan | ||||
// will pick up both blocks, not just the first. | // will pick up both blocks, not just the first. | ||||
const int64_t BLOCK_TIME = chainActive.Tip()->GetBlockTimeMax() + 5; | const int64_t BLOCK_TIME = chainActive.Tip()->GetBlockTimeMax() + 5; | ||||
SetMockTime(BLOCK_TIME); | SetMockTime(BLOCK_TIME); | ||||
m_coinbase_txns.emplace_back( | m_coinbase_txns.emplace_back( | ||||
CreateAndProcessBlock({}, | CreateAndProcessBlock({}, | ||||
GetScriptForRawPubKey(coinbaseKey.GetPubKey())) | GetScriptForRawPubKey(coinbaseKey.GetPubKey())) | ||||
.vtx[0]); | .vtx[0]); | ||||
▲ Show 20 Lines • Show All 254 Lines • Show Last 20 Lines |