From 0d121833afc7d8cb38bb17787b256ccebd2f8f29 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 20 Oct 2020 19:53:28 +1000 Subject: [PATCH] Add sync tests that download 2000 blocks --- zebrad/tests/acceptance.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index 61f17e7a..5b71c6c7 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -479,6 +479,30 @@ fn sync_one_checkpoint_testnet() -> Result<()> { ) } +/// Test if `zebrad` can sync the second checkpoint on mainnet. +/// +/// The second checkpoint contains a large number of blocks. +#[test] +fn sync_two_checkpoints_mainnet() -> Result<()> { + sync_until( + "verified checkpoint range block_count=2000", + Mainnet, + Duration::from_secs(120), + ) +} + +/// Test if `zebrad` can sync the second checkpoint on testnet. +/// +/// The second checkpoint contains a large number of blocks. +#[test] +fn sync_two_checkpoints_testnet() -> Result<()> { + sync_until( + "verified checkpoint range block_count=2000", + Testnet, + Duration::from_secs(120), + ) +} + /// Sync `network` until `zebrad` outputs `regex`. /// Returns an error if `timeout` elapses before `regex` is output. ///