Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint
  • Loading branch information
kostekIV committed Nov 2, 2022
commit a2ad73dbd3e7c94669898e7c968f896e60d453e9
20 changes: 17 additions & 3 deletions e2e-tests/src/test/ban.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
use aleph_client::{ban_from_committee, change_ban_config, change_validators, get_current_era, get_current_era_non_reserved_validators, get_current_era_validators, get_current_session, get_next_era_non_reserved_validators, get_next_era_reserved_validators, get_underperformed_validator_session_count, wait_for_at_least_session, wait_for_full_era_completion, SignedConnection, XtStatus, set_elections_openness};
use aleph_client::{
ban_from_committee, change_ban_config, change_validators, get_current_era,
get_current_era_non_reserved_validators, get_current_era_validators, get_current_session,
get_next_era_non_reserved_validators, get_next_era_reserved_validators,
get_underperformed_validator_session_count, set_elections_openness, wait_for_at_least_session,
wait_for_full_era_completion, SignedConnection, XtStatus,
};
use log::info;
use primitives::{BanInfo, BanReason, CommitteeSeats, SessionCount, DEFAULT_BAN_MINIMAL_EXPECTED_PERFORMANCE, DEFAULT_BAN_SESSION_COUNT_THRESHOLD, DEFAULT_CLEAN_SESSION_COUNTER_DELAY, ElectionOpenness};
use primitives::{
BanInfo, BanReason, CommitteeSeats, ElectionOpenness, SessionCount,
DEFAULT_BAN_MINIMAL_EXPECTED_PERFORMANCE, DEFAULT_BAN_SESSION_COUNT_THRESHOLD,
DEFAULT_CLEAN_SESSION_COUNTER_DELAY,
};

use crate::{
accounts::{account_ids_from_keys, get_validator_seed, NodeKeys},
Expand Down Expand Up @@ -146,7 +156,11 @@ pub fn permissionless_ban(config: &Config) -> anyhow::Result<()> {
let root_connection = config.create_root_connection();
info!(target: "aleph-client", "changing ban config");

set_elections_openness(&root_connection, ElectionOpenness::Permissionless, XtStatus::InBlock);
set_elections_openness(
&root_connection,
ElectionOpenness::Permissionless,
XtStatus::InBlock,
);
change_ban_config(
&root_connection,
None,
Expand Down