Skip to content

Commit

Permalink
Fix validation tests' imports
Browse files Browse the repository at this point in the history
The kes and vrf crypto stuff has been moved from pallas to here, but
apparently the tests were not checked when this was done.
  • Loading branch information
abailly authored and AndrewWestberg committed Nov 27, 2024
1 parent 39bb96b commit ca1d447
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ouroboros-praos/tests/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use ctor::ctor;
use mockall::predicate::eq;
use ouroboros::ledger::{MockLedgerState, PoolSigma};
use ouroboros::validator::Validator;
use ouroboros_crypto::kes::KesSecretKey;
use ouroboros_praos::consensus::BlockValidator;
use pallas_crypto::hash::Hash;
use pallas_crypto::kes::KesSecretKey;
use pallas_crypto::key::ed25519::SecretKey;
use pallas_math::math::FixedDecimal;
use pallas_traverse::{ComputeHash, MultiEraHeader};
Expand Down Expand Up @@ -49,7 +49,7 @@ struct GeneratorContext {
#[serde(rename = "ocertCounters")]
operational_certificate_counters: HashMap<Hash<28>, u64>,
#[serde(rename = "activeSlotCoeff")]
active_slot_coeff : f64
active_slot_coeff: f64,
}

impl GeneratorContext {
Expand All @@ -72,7 +72,8 @@ impl std::fmt::Debug for GeneratorContext {
.field(
"operational_certificate_counters",
&self.operational_certificate_counters,
).field("active_slot_coeff", &self.active_slot_coeff)
)
.field("active_slot_coeff", &self.active_slot_coeff)
.finish()
}
}
Expand Down Expand Up @@ -182,7 +183,11 @@ fn mock_ledger_state(context: &GeneratorContext) -> MockLedgerState {
let vrf_vkey_hash = context.vrf_vkey_hash;
let praos_slots_per_kes_period = context.praos_slots_per_kes_period;
let praos_max_kes_evolution = context.praos_max_kes_evolution;
let opcert_counter = context.operational_certificate_counters.get(&pool_id).copied().or(None);
let opcert_counter = context
.operational_certificate_counters
.get(&pool_id)
.copied()
.or(None);

ledger_state
.expect_pool_id_to_sigma()
Expand Down

0 comments on commit ca1d447

Please sign in to comment.