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
Commits
742e54a9
Commit
742e54a9
authored
Oct 29, 2021
by
Jonah Husson
Browse files
Options
Downloads
Patches
Plain Diff
Node multiplier should be average of theirs & max for round
parent
019d40cf
No related branches found
No related tags found
1 merge request
!2
Node multiplier should be average of theirs & max for round
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
points.py
+12
-11
12 additions, 11 deletions
points.py
with
12 additions
and
11 deletions
points.py
+
12
−
11
View file @
742e54a9
...
...
@@ -205,12 +205,13 @@ def round_point_computation(point_info, round_info, active_nodes):
# NOTE: Weirdness can result here from nodes going offline between eras. Should be reviewed.
multipliers
=
[
node_multipliers
[
bytes
(
node_id
)]
for
node_id
in
topology
if
node_multipliers
.
get
(
bytes
(
node_id
))]
multiplier
=
max
(
multipliers
)
points
=
success_points
*
multiplier
raw_points
=
success_points
max_multiplier
=
max
(
multipliers
)
# Assign points to wallets
for
node_id
in
topology
:
node_mult
=
(
max_multiplier
+
node_multipliers
[
bytes
(
node_id
)])
/
2
points
=
success_points
*
node_mult
raw_points
=
success_points
# NOTE: Weirdness can result here from nodes going offline between eras. Should be reviewed.
wallet
=
node_wallets
.
get
(
bytes
(
node_id
))
if
wallet
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment