Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Commit ca1d447

Browse files
abaillyAndrewWestberg
authored andcommitted
Fix validation tests' imports
The kes and vrf crypto stuff has been moved from pallas to here, but apparently the tests were not checked when this was done.
1 parent 39bb96b commit ca1d447

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

ouroboros-praos/tests/validation.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use ctor::ctor;
44
use mockall::predicate::eq;
55
use ouroboros::ledger::{MockLedgerState, PoolSigma};
66
use ouroboros::validator::Validator;
7+
use ouroboros_crypto::kes::KesSecretKey;
78
use ouroboros_praos::consensus::BlockValidator;
89
use pallas_crypto::hash::Hash;
9-
use pallas_crypto::kes::KesSecretKey;
1010
use pallas_crypto::key::ed25519::SecretKey;
1111
use pallas_math::math::FixedDecimal;
1212
use pallas_traverse::{ComputeHash, MultiEraHeader};
@@ -49,7 +49,7 @@ struct GeneratorContext {
4949
#[serde(rename = "ocertCounters")]
5050
operational_certificate_counters: HashMap<Hash<28>, u64>,
5151
#[serde(rename = "activeSlotCoeff")]
52-
active_slot_coeff : f64
52+
active_slot_coeff: f64,
5353
}
5454

5555
impl GeneratorContext {
@@ -72,7 +72,8 @@ impl std::fmt::Debug for GeneratorContext {
7272
.field(
7373
"operational_certificate_counters",
7474
&self.operational_certificate_counters,
75-
).field("active_slot_coeff", &self.active_slot_coeff)
75+
)
76+
.field("active_slot_coeff", &self.active_slot_coeff)
7677
.finish()
7778
}
7879
}
@@ -182,7 +183,11 @@ fn mock_ledger_state(context: &GeneratorContext) -> MockLedgerState {
182183
let vrf_vkey_hash = context.vrf_vkey_hash;
183184
let praos_slots_per_kes_period = context.praos_slots_per_kes_period;
184185
let praos_max_kes_evolution = context.praos_max_kes_evolution;
185-
let opcert_counter = context.operational_certificate_counters.get(&pool_id).copied().or(None);
186+
let opcert_counter = context
187+
.operational_certificate_counters
188+
.get(&pool_id)
189+
.copied()
190+
.or(None);
186191

187192
ledger_state
188193
.expect_pool_id_to_sigma()

0 commit comments

Comments
 (0)