Sync block verification (#74)

* Synchronize block verification
* max_round_blocks_to_import set to 1
* Fixed test that rely on 12block batches

Co-authored-by: adria0.eth <5526331+adria0@users.noreply.github.com>
This commit is contained in:
rakita
2020-10-27 10:45:48 +01:00
committed by draganrakita
parent e69d2009cf
commit 905d76b436
6 changed files with 18 additions and 10 deletions

View File

@@ -706,7 +706,7 @@ usage! {
"--stratum-secret=[STRING]",
"Secret for authorizing Stratum server for peers.",
ARG arg_max_round_blocks_to_import: (usize) = 12usize, or |c: &Config| c.mining.as_ref()?.max_round_blocks_to_import.clone(),
ARG arg_max_round_blocks_to_import: (usize) = 1usize, or |c: &Config| c.mining.as_ref()?.max_round_blocks_to_import.clone(),
"--max-round-blocks-to-import=[S]",
"Maximal number of blocks to import for each import round.",
@@ -1386,7 +1386,7 @@ mod tests {
arg_notify_work: Some("http://localhost:3001".into()),
flag_refuse_service_transactions: false,
flag_infinite_pending_block: false,
arg_max_round_blocks_to_import: 12usize,
arg_max_round_blocks_to_import: 1usize,
flag_stratum: false,
arg_stratum_interface: "local".to_owned(),

View File

@@ -1369,7 +1369,7 @@ mod tests {
check_seal: true,
with_color: !cfg!(windows),
verifier_settings: Default::default(),
max_round_blocks_to_import: 12,
max_round_blocks_to_import: 1,
}))
);
}
@@ -1395,7 +1395,7 @@ mod tests {
from_block: BlockId::Number(1),
to_block: BlockId::Latest,
check_seal: true,
max_round_blocks_to_import: 12,
max_round_blocks_to_import: 1,
}))
);
}
@@ -1423,7 +1423,7 @@ mod tests {
code: true,
min_balance: None,
max_balance: None,
max_round_blocks_to_import: 12,
max_round_blocks_to_import: 1,
}))
);
}
@@ -1456,7 +1456,7 @@ mod tests {
from_block: BlockId::Number(1),
to_block: BlockId::Latest,
check_seal: true,
max_round_blocks_to_import: 12,
max_round_blocks_to_import: 1,
}))
);
}
@@ -1550,7 +1550,7 @@ mod tests {
download_old_blocks: true,
verifier_settings: Default::default(),
no_persistent_txqueue: false,
max_round_blocks_to_import: 12,
max_round_blocks_to_import: 1,
metrics_conf: MetricsConfiguration::default(),
};
expected.secretstore_conf.enabled = cfg!(feature = "secretstore");