diff --git a/zebra-scan/src/tests.rs b/zebra-scan/src/tests.rs index d155eecc898..7496beeeafa 100644 --- a/zebra-scan/src/tests.rs +++ b/zebra-scan/src/tests.rs @@ -191,11 +191,17 @@ async fn scanning_zecpages_from_populated_zebra_state() -> Result<()> { let vks: Vec<(&AccountId, &SaplingIvk)> = vec![(&account, &ivk)]; let network = zebra_chain::parameters::Network::default(); - let state_config = Default::default(); + // Create a continuous chain of mainnet blocks from genesis + let blocks: Vec> = zebra_test::vectors::CONTINUOUS_MAINNET_BLOCKS + .iter() + .map(|(_height, block_bytes)| block_bytes.zcash_deserialize_into().unwrap()) + .collect(); + + // Create a populated state service. let (_state_service, read_only_state_service, latest_chain_tip, _chain_tip_change) = - zebra_state::spawn_init(state_config, network, zebra_chain::block::Height::MAX, 3000) - .await?; + zebra_state::populated_state(blocks.clone(), network).await; + let db = read_only_state_service.db(); // use the tip as starting height