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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xx network
Scheduling Scripts
Merge requests
!2
Node multiplier should be average of theirs & max for round
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Node multiplier should be average of theirs & max for round
avg-mult
into
master
Overview
0
Commits
3
Pipelines
0
Changes
1
Merged
Jonah Husson
requested to merge
avg-mult
into
master
3 years ago
Overview
0
Commits
3
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
4e807870
Prev
Next
Show latest version
1 file
+
9
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
4e807870
fix bug
· 4e807870
Jake Taylor
authored
3 years ago
points.py
+
9
−
8
Options
@@ -209,14 +209,15 @@ def round_point_computation(point_info, round_info, active_nodes):
# Assign points to wallets
for
node_id
in
topology
:
node_mult
=
(
max_multiplier
+
node_multipliers
[
bytes
(
node_id
)])
/
2
points
=
success_points
*
node_mult
# NOTE: Weirdness can result here from nodes going offline between eras. Should be reviewed.
wallet
=
node_wallets
.
get
(
bytes
(
node_id
))
if
wallet
:
wallet_points
[
wallet
]
+=
points
raw_points_dict
[
wallet
]
+=
success_points
if
node_multipliers
.
get
(
bytes
(
node_id
)):
node_mult
=
(
max_multiplier
+
node_multipliers
[
bytes
(
node_id
)])
/
2
points
=
success_points
*
node_mult
# NOTE: Weirdness can result here from nodes going offline between eras. Should be reviewed.
wallet
=
node_wallets
.
get
(
bytes
(
node_id
))
if
wallet
:
wallet_points
[
wallet
]
+=
points
raw_points_dict
[
wallet
]
+=
success_points
log
.
debug
(
f
"
Wallet points:
{
wallet_points
}
"
)
return
wallet_points
,
raw_points_dict
Loading