Skip to content

Commit

Permalink
tests: fix consensus constants compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaslong committed Mar 11, 2024
1 parent 30b78b1 commit 9e055b4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ledger/narwhal/batch-header/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ pub struct BatchHeader<N: Network> {

impl<N: Network> BatchHeader<N> {
/// The maximum number of certificates in a batch.
#[cfg(not(any(test, feature = "test")))]
#[cfg(not(any(test, feature = "test-helpers")))]
pub const MAX_CERTIFICATES: u16 = 10;
/// The maximum number of certificates in a batch.
/// This is set to a deliberately high value (100) for testing purposes only.
#[cfg(any(test, feature = "test"))]
#[cfg(any(test, feature = "test-helpers"))]
pub const MAX_CERTIFICATES: u16 = 100;
/// The maximum number of rounds to store before garbage collecting.
pub const MAX_GC_ROUNDS: usize = 100;
Expand Down
15 changes: 15 additions & 0 deletions synthesizer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,21 @@ package = "snarkvm-ledger-committee"
path = "../ledger/committee"
features = [ "test-helpers" ]

[dev-dependencies.ledger-narwhal]
package = "snarkvm-ledger-narwhal"
path = "../ledger/narwhal"
features = [ "test-helpers" ]

[dev-dependencies.ledger-narwhal-batch-certificate]
package = "snarkvm-ledger-narwhal-batch-certificate"
path = "../ledger/narwhal/batch-certificate"
features = [ "test-helpers" ]

[dev-dependencies.ledger-narwhal-batch-header]
package = "snarkvm-ledger-narwhal-batch-header"
path = "../ledger/narwhal/batch-header"
features = [ "test-helpers" ]

[dev-dependencies.ledger-test-helpers]
package = "snarkvm-ledger-test-helpers"
path = "../ledger/test-helpers"
Expand Down

0 comments on commit 9e055b4

Please sign in to comment.