Skip to content

Commit

Permalink
https://github.com/pendulum-chain/spacewalk/actions/runs/6491793772/j…
Browse files Browse the repository at this point in the history
…ob/17629635299?pr=385#step:11:58
  • Loading branch information
b-yap committed Oct 12, 2023
1 parent c51d07b commit b443b87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pallets/stellar-relay/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use frame_support::BoundedVec;
use crate::{
traits::{Organization, Validator},
Config,
};
use frame_support::BoundedVec;

pub type OrganizationIdOf<T> = <T as Config>::OrganizationId;
pub type ValidatorOf<T> = Validator<OrganizationIdOf<T>>;
pub type OrganizationOf<T> = Organization<OrganizationIdOf<T>>;

pub type ValidatorsList<T> = BoundedVec<ValidatorOf<T>, <T as Config>::ValidatorLimit>;
pub type OrganizationsList<T> = BoundedVec<OrganizationOf<T>, <T as Config>::OrganizationLimit>;
pub type OrganizationsList<T> = BoundedVec<OrganizationOf<T>, <T as Config>::OrganizationLimit>;
11 changes: 3 additions & 8 deletions pallets/stellar-relay/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use primitives::stellar::{

use crate::{
pallet::{verify_signature, Config},
types::{OrganizationsList, ValidatorOf, ValidatorsList},
Error, NewValidatorsEnactmentBlockHeight, OldOrganizations, OldValidators, Organizations,
Pallet, Validators,
};
use crate::types::{OrganizationsList, ValidatorOf, ValidatorsList};

/// Returns a map of organizationID to the number of validators that belongs to it
fn validator_count_per_org<T: Config>(
Expand Down Expand Up @@ -189,13 +189,8 @@ pub fn find_externalized_envelope<T: Config>(
.ok_or(Error::<T>::MissingExternalizedMessage)
}

pub fn validators_and_orgs<T: Config>() -> Result<
(
ValidatorsList<T>,
OrganizationsList<T>,
),
Error<T>,
> {
pub fn validators_and_orgs<T: Config>(
) -> Result<(ValidatorsList<T>, OrganizationsList<T>), Error<T>> {
// Choose the set of validators to use for validation based on the enactment block
// height and the current block number
let should_use_new_validator_set =
Expand Down

0 comments on commit b443b87

Please sign in to comment.