8c8b7d71d0
* validator-api: create node status cache with selection probabilies Create a node status cache to complement the contract cache. Initially we store the simulated active set selection probabilities. * validator-api: add validator cache watch channel * changelog: add note * validator-api: clippy fixes * validator-api: fix clippy * validator-api: additional fields to inclusion probabilities response * selection chance: revert back to 3 buckets * selection chance: revert buckets again * rustfmt * validator-api: remove the old get_mixnode_inclusion_probability * node-status-cache: return error when refreshing * inclusion-simulator: cap on wall clock time * node status cache: tidy
12 lines
435 B
Rust
12 lines
435 B
Rust
#[derive(thiserror::Error, Debug)]
|
|
pub enum Error {
|
|
#[error("The list of cumulative stake was unexpectedly empty")]
|
|
EmptyListCumulStake,
|
|
#[error("Sample point was unexpectedly out of bounds")]
|
|
SamplePointOutOfBounds,
|
|
#[error("Norm computation failed on different size arrays")]
|
|
NormDifferenceSizeArrays,
|
|
#[error("Computed probabilities are fewer than input number of nodes")]
|
|
ResultsShorterThanInput,
|
|
}
|