Ensure that data generator provides potential future validators

parent 6cae1c53
Pipeline #22182077 passed with stages
in 26 minutes 17 seconds
......@@ -1260,16 +1260,24 @@ data_sks_1(MustHaveAnUnlockedAccount) ->
ValidatorsSKsVotesAbsencies)
),
future_validators_accounts_sks(Height, EpochLength),
case MustHaveAnUnlockedAccount of
true ->
?SUCHTHAT(
AccountsSKs,
list(account_secret(none, Height)),
lists:any(
fun ({Account, _}) -> not is_locked(Account) end,
AccountsSKs));
false ->
list(account_secret(none, Height))
begin
NextEpochStart = EpochLength * (Height div EpochLength + 1),
?SUCHTHAT(
AccountsSKs,
?LET(
{NonSpecificAccountsSKs,
PotentialFutureValidatorsSKs},
{list(account_secret(none, Height)),
non_empty(list(account_secret(true, NextEpochStart)))},
NonSpecificAccountsSKs ++ PotentialFutureValidatorsSKs),
case MustHaveAnUnlockedAccount of
true ->
lists:any(
fun ({Account, _}) -> not is_locked(Account) end,
AccountsSKs);
false ->
true
end)
end},
begin
FreshTxs =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment