Skip to content

Commit

Permalink
use test blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed Nov 7, 2023
1 parent 52958eb commit 76e39a0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions zebra-scan/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Arc<Block>> = 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
Expand Down

0 comments on commit 76e39a0

Please sign in to comment.