Make the checkpoint limit test more readable (#941)
* fix: Pass zebra_consensus::Config in a test * fix: Remove a redundant import
This commit is contained in:
parent
619c499ba6
commit
fa04072298
|
@ -226,8 +226,14 @@ async fn verify_block() -> Result<(), Report> {
|
|||
|
||||
#[tokio::test]
|
||||
async fn verify_checkpoint_test() -> Result<(), Report> {
|
||||
verify_checkpoint(true).await?;
|
||||
verify_checkpoint(false).await?;
|
||||
verify_checkpoint(Config {
|
||||
checkpoint_sync: true,
|
||||
})
|
||||
.await?;
|
||||
verify_checkpoint(Config {
|
||||
checkpoint_sync: false,
|
||||
})
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -236,11 +242,9 @@ async fn verify_checkpoint_test() -> Result<(), Report> {
|
|||
///
|
||||
/// Also tests the `chain::init` function.
|
||||
#[spandoc::spandoc]
|
||||
async fn verify_checkpoint(checkpoint_sync: bool) -> Result<(), Report> {
|
||||
async fn verify_checkpoint(config: Config) -> Result<(), Report> {
|
||||
zebra_test::init();
|
||||
|
||||
let config = Config { checkpoint_sync };
|
||||
|
||||
// Test that the chain::init function works. Most of the other tests use
|
||||
// init_from_verifiers.
|
||||
let chain_verifier = super::init(
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
use color_eyre::eyre::Result;
|
||||
use std::{fs, io::Write, path::PathBuf, time::Duration};
|
||||
use tempdir::TempDir;
|
||||
use toml;
|
||||
|
||||
use zebra_test::prelude::*;
|
||||
use zebrad::config::ZebradConfig;
|
||||
|
|
Loading…
Reference in New Issue