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
9a29e36f
Commit
9a29e36f
authored
Oct 29, 2021
by
Jonah Husson
Browse files
Options
Downloads
Patches
Plain Diff
Don't actually need raw points
parent
742e54a9
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
+2
-2
2 additions, 2 deletions
points.py
with
2 additions
and
2 deletions
points.py
+
2
−
2
View file @
9a29e36f
...
@@ -211,12 +211,12 @@ def round_point_computation(point_info, round_info, active_nodes):
...
@@ -211,12 +211,12 @@ def round_point_computation(point_info, round_info, active_nodes):
for
node_id
in
topology
:
for
node_id
in
topology
:
node_mult
=
(
max_multiplier
+
node_multipliers
[
bytes
(
node_id
)])
/
2
node_mult
=
(
max_multiplier
+
node_multipliers
[
bytes
(
node_id
)])
/
2
points
=
success_points
*
node_mult
points
=
success_points
*
node_mult
raw_points
=
success_points
# NOTE: Weirdness can result here from nodes going offline between eras. Should be reviewed.
# NOTE: Weirdness can result here from nodes going offline between eras. Should be reviewed.
wallet
=
node_wallets
.
get
(
bytes
(
node_id
))
wallet
=
node_wallets
.
get
(
bytes
(
node_id
))
if
wallet
:
if
wallet
:
wallet_points
[
wallet
]
+=
points
wallet_points
[
wallet
]
+=
points
raw_points_dict
[
wallet
]
+=
raw
_points
raw_points_dict
[
wallet
]
+=
success
_points
log
.
debug
(
f
"
Wallet points:
{
wallet_points
}
"
)
log
.
debug
(
f
"
Wallet points:
{
wallet_points
}
"
)
return
wallet_points
,
raw_points_dict
return
wallet_points
,
raw_points_dict
...
...
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