Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Scheduling Scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xx network
Scheduling Scripts
Merge requests
!8
Swap to offending validators
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Swap to offending validators
offending-validators
into
master
Overview
1
Commits
2
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Merged
Swap to offending validators
Jonah Husson
requested to merge
offending-validators
into
master
Nov 22, 2021
Overview
1
Commits
2
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
0
0
Merge request reports
Compare
master
version 1
0fc6f6d0
Nov 22, 2021
master (base)
and
latest version
latest version
c84de13a
2 commits,
Nov 22, 2021
version 1
0fc6f6d0
1 commit,
Nov 22, 2021
1 file
+
7
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
scheduling.py
+
7
−
7
View file @ c84de13a
Edit in single-file editor
Open in Web IDE
Show full file
@@ -319,22 +319,22 @@ def poll_active_nodes(substrate):
try
:
validator_set
=
substrate
.
query
(
"
Session
"
,
"
Validators
"
)
except
Exception
as
e
:
log
.
error
(
"
Failed to query validators
"
)
log
.
error
(
f
"
Failed to query validators
:
{
e
}
"
)
raise
e
try
:
disabled
_set
=
substrate
.
query
(
"
S
ession
"
,
"
Disabled
Validators
"
)
offending
_set
=
substrate
.
query
(
"
S
taking
"
,
"
Offending
Validators
"
)
except
Exception
as
e
:
log
.
error
(
"
Failed to query
disabled set
"
)
log
.
error
(
f
"
Failed to query
offending validators:
{
e
}
"
)
raise
e
# Bc we use pop to remove disabled, go backwards through this list. Otherwise, popping early index shifts later ones
disabled
_set
.
value
.
reverse
()
for
val
in
disabled
_set
.
value
:
offending
_set
.
value
.
reverse
()
for
val
in
offending
_set
.
value
:
try
:
validator_set
.
value
.
pop
(
val
)
validator_set
.
value
.
pop
(
val
[
0
]
)
except
IndexError
as
e
:
log
.
error
(
f
"
Invalid
disabled
set value
{
val
}
for validator set of
{
len
(
validator_set
.
value
)
}
:
{
e
}
"
)
log
.
error
(
f
"
Invalid
offending
set value
{
val
}
for validator set of
{
len
(
validator_set
.
value
)
}
:
{
e
}
"
)
ids_map
=
{}
for
val
in
validator_set
.
value
:
Loading