Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycfhelpers
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
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
cellframe
python-cellframe-modules
pycfhelpers
Commits
f43e926f
Commit
f43e926f
authored
1 year ago
by
boo
Browse files
Options
Downloads
Patches
Plain Diff
some fix
parent
283f6ad1
No related branches found
No related tags found
1 merge request
!4
Feature 10361
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
node/cli.py
+3
-2
3 additions, 2 deletions
node/cli.py
node/logging.py
+1
-1
1 addition, 1 deletion
node/logging.py
node/net.py
+6
-7
6 additions, 7 deletions
node/net.py
with
10 additions
and
10 deletions
node/cli.py
+
3
−
2
View file @
f43e926f
from
typing
import
Callable
,
Protocol
from
typing
import
Callable
,
Protocol
,
NewType
import
traceback
from
CellFrame
import
AppCliServer
from
DAP.Core
import
logIt
from
optparse
import
OptionParser
from
pycfhelpers.node.types
import
ReplyId
ReplyId
=
NewType
(
"
ReplyId
"
,
int
)
class
ReplyObject
:
...
...
This diff is collapsed.
Click to expand it.
node/logging.py
+
1
−
1
View file @
f43e926f
from
DAP.Core
import
logIt
class
CFLog
:
def
__init__
(
self
):
self
.
_logger
=
logIt
...
...
@@ -30,4 +31,3 @@ class CFLog:
def
critical
(
self
,
message
:
str
):
self
.
_logger
.
critical
(
message
)
This diff is collapsed.
Click to expand it.
node/net.py
+
6
−
7
View file @
f43e926f
from
typing
import
Iterator
,
Callable
,
Self
from
typing
import
Iterator
,
Callable
import
traceback
...
...
@@ -26,22 +26,21 @@ class NetFee:
class
CFNet
:
@staticmethod
def
active_nets
()
->
list
[
Self
]:
return
[
CFNet
(
n
.
getName
())
for
n
in
Net
.
getNets
()]
def
__init__
(
self
,
name
:
str
):
self
.
name
=
name
self
.
_origin_net
=
Net
.
byName
(
name
)
if
not
self
.
_origin_net
:
raise
RuntimeError
(
f
"
No such net:
{
name
}
"
)
self
.
main
=
CFChain
(
self
,
'
main
'
)
self
.
zerochain
=
CFChain
(
self
,
'
zerochain
'
)
self
.
fee_data
=
NetFee
(
self
)
@staticmethod
def
active_nets
()
->
list
[
'
CFNet
'
]:
return
[
CFNet
(
n
.
getName
())
for
n
in
Net
.
getNets
()]
@property
def
id
(
self
)
->
int
:
return
self
.
_origin_net
.
id
.
long
()
...
...
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