Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
silkaj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
silkaj
Merge requests
!263
Drop Python 3.8 support (
#464
)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Drop Python 3.8 support (
#464
)
464_drop_python_3.8
into
main
Overview
0
Commits
2
Pipelines
2
Changes
14
Merged
Moul
requested to merge
464_drop_python_3.8
into
main
7 months ago
Overview
0
Commits
2
Pipelines
2
Changes
14
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
9e0259d4
2 commits,
7 months ago
14 files
+
84
−
94
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
14
Search (e.g. *.vue) (Ctrl+P)
silkaj/blockchain/difficulty.py
+
2
−
3
Options
@@ -16,7 +16,6 @@
from
collections
import
OrderedDict
from
operator
import
itemgetter
from
os
import
system
from
typing
import
Dict
,
Tuple
import
jsonschema
import
rich_click
as
click
@@ -46,7 +45,7 @@ def difficulties() -> None:
print
(
f
"
{
e
.
__class__
.
__name__
!s}
:
{
e
!s}
"
)
def
display_diffi
(
current
:
WSConnection
,
diffi
:
D
ict
)
->
None
:
def
display_diffi
(
current
:
WSConnection
,
diffi
:
d
ict
)
->
None
:
levels
=
[
OrderedDict
((
i
,
d
[
i
])
for
i
in
(
"
uid
"
,
"
level
"
))
for
d
in
diffi
[
"
levels
"
]]
diffi
[
"
levels
"
]
=
levels
issuers
=
0
@@ -72,7 +71,7 @@ Common Proof-of-Work difficulty level: {current["powMin"]}, hash starting with `
print
(
content
)
def
match_pattern
(
_pow
:
int
,
match
:
str
=
""
,
p
:
int
=
1
)
->
T
uple
[
str
,
int
]:
def
match_pattern
(
_pow
:
int
,
match
:
str
=
""
,
p
:
int
=
1
)
->
t
uple
[
str
,
int
]:
while
_pow
>
0
:
if
_pow
>=
16
:
match
+=
"
0
"
Loading