Skip to content

Commit 1238b53

Browse files
authored
Merge pull request #4316 from ProvableHQ/tests/relax_cert_count_errors
[Tests] Relax the cert count check under test_network
2 parents 303dd83 + 152df29 commit 1238b53

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

node/bft/src/helpers/storage.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,12 @@ impl<N: Network> Storage<N> {
505505
bail!("Missing certificates for the previous round {previous_round} in storage {gc_log}")
506506
}
507507
// Ensure the number of previous certificate IDs is at or below the number of committee members.
508-
if batch_header.previous_certificate_ids().len() > previous_committee_lookback.num_members() {
508+
// As for the `test_network` clause, a more robust approach would be to set the
509+
// previous_committee_lookback appropriately when dev-on-prod is activated, or to only skip this
510+
// check right at the hotswap height.
511+
if !cfg!(feature = "test_network")
512+
&& batch_header.previous_certificate_ids().len() > previous_committee_lookback.num_members()
513+
{
509514
bail!("Too many previous certificates for round {round} {gc_log}")
510515
}
511516
// Initialize a set of the previous authors.

0 commit comments

Comments
 (0)