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
265a3914
Commit
265a3914
authored
Nov 14, 2021
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
fix unit
parent
c1a4a31e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
points.py
+2
-1
2 additions, 1 deletion
points.py
with
2 additions
and
1 deletion
points.py
+
2
−
1
View file @
265a3914
...
@@ -21,6 +21,7 @@ import time
...
@@ -21,6 +21,7 @@ import time
substrate_conn_freq
=
10
# Frequency of attempting reconnects in seconds
substrate_conn_freq
=
10
# Frequency of attempting reconnects in seconds
xxdot_url
=
""
xxdot_url
=
""
ns_in_s
=
float
(
1e+9
)
# Conversion from nanosecond to second
ns_in_s
=
float
(
1e+9
)
# Conversion from nanosecond to second
ms_in_ns
=
1e+6
THOUSAND
=
1_000
THOUSAND
=
1_000
state_key
=
"
consensus_points_timestamp
"
# Static key used for states table
state_key
=
"
consensus_points_timestamp
"
# Static key used for states table
positive_points_func
=
'
submit_cmix_points
'
positive_points_func
=
'
submit_cmix_points
'
...
@@ -76,7 +77,7 @@ def main():
...
@@ -76,7 +77,7 @@ def main():
try
:
try
:
# Get up-to-date period information from blockchain
# Get up-to-date period information from blockchain
point_info
=
poll_point_info
(
substrate
)
point_info
=
poll_point_info
(
substrate
)
period
=
point_info
[
'
period
'
]
*
1e+6
period
=
int
(
point_info
[
'
period
'
]
*
ms_in_ns
)
# Wait until the next period arrives
# Wait until the next period arrives
next_period
=
last_checked_ts
+
period
next_period
=
last_checked_ts
+
period
...
...
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