Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
algorand
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nilak
algorand
Commits
259af4b5
Commit
259af4b5
authored
May 02, 2019
by
THAKARE AKSHAY HARIBHAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated logging format
parent
ee00ede0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
OverlayNode.py
OverlayNode.py
+5
-1
Starter.py
Starter.py
+3
-1
No files found.
OverlayNode.py
View file @
259af4b5
...
...
@@ -59,7 +59,7 @@ class OverlayNode(Node):
# Todo something is wrong here not getting correct votes back
votes
=
Utility
.
verifySort
(
pk
,
sorthash
,
proof
,
seed
,
tou
,
role
,
self
.
network
.
pk_weight_map
.
get
(
pk
),
self
.
network
.
badaW
)
if
votes
:
self
.
logger
.
info
(
"THese are valid committee votes with votes : "
,
votes
)
self
.
logger
.
info
(
"THese are valid committee votes with votes : "
+
str
(
votes
)
)
print
(
"why votes be zero :"
,
role
)
print
(
votes
,
"
\t
"
,
value
,
"
\t
"
,
sorthash
)
return
votes
,
value
,
sorthash
...
...
@@ -67,6 +67,8 @@ class OverlayNode(Node):
def
partOfCountVotes
(
self
,
round
,
step
,
start
,
counts
,
voters
,
T
,
tou
):
msgs
=
self
.
uniqueReceivedMessages
.
pop
(
Config
.
COMMITTEE_VOTE_MSG_type
)
print
(
"-------------msgs , "
,
self
.
id
)
print
(
msgs
)
for
msg
in
msgs
:
msg_round
=
msg
[
1
][
1
][
0
]
...
...
@@ -81,6 +83,8 @@ class OverlayNode(Node):
continue
voters
.
append
(
msg_pk
)
counts
[
value
]
=
counts
[
value
]
+
votes
print
(
'--------------counts-------------'
,
self
.
id
)
print
(
counts
)
if
counts
[
value
]
>
T
*
tou
:
print
(
"returning value"
)
return
value
...
...
Starter.py
View file @
259af4b5
...
...
@@ -4,7 +4,9 @@ from TestCases import populateTodolist
import
logging
logging
.
basicConfig
(
filename
=
'ASim.log'
,
level
=
logging
.
INFO
)
# logging.basicConfig(filename='ASim.log', level=logging.INFO)
# logging.basicConfig(filename='ASim.log', format="%(funcName)s():%(lineno)i: %(message)s")
logging
.
basicConfig
(
filename
=
'ASim.log'
,
level
=
logging
.
INFO
,
format
=
"
%(levelname)
s [
%(name)
s.
%(funcName)
s:
%(lineno)
d]
%(message)
s"
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment