Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Short session mode is now 3 #789

Merged
merged 4 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion e2e-tests/src/test/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ pub async fn staking_new_validator() -> anyhow::Result<()> {
total: MIN_VALIDATOR_BOND,
active: MIN_VALIDATOR_BOND,
unlocking: BoundedVec(vec![]),
claimed_rewards: BoundedVec(vec![]),
// since era is 3 sessions, validate is done in the first block of 2nd session,
// that is already after elections has been done for 1st era
claimed_rewards: BoundedVec(vec![0]),
pmikolajczyk41 marked this conversation as resolved.
Show resolved Hide resolved
}
);

Expand Down
2 changes: 1 addition & 1 deletion primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub const MILLISECS_PER_BLOCK: u64 = 1000;
#[cfg(feature = "short_session")]
pub const DEFAULT_SESSION_PERIOD: u32 = 30;
#[cfg(feature = "short_session")]
pub const DEFAULT_SESSIONS_PER_ERA: SessionIndex = 5;
pub const DEFAULT_SESSIONS_PER_ERA: SessionIndex = 3;
kostekIV marked this conversation as resolved.
Show resolved Hide resolved

// Default values outside testing
#[cfg(not(feature = "short_session"))]
Expand Down