Add sync tests that download 2000 blocks

This commit is contained in:
teor 2020-10-20 19:53:28 +10:00
parent b4f92adc40
commit 0d121833af
1 changed files with 24 additions and 0 deletions

View File

@ -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.
///