Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DisSys Inc.
bsc-shamir
Commits
bba3590a
Commit
bba3590a
authored
Jun 08, 2020
by
Anders Jensen Løvig
Browse files
Fix wait for tallies
parent
cbc4b7df
Changes
1
Hide whitespace changes
Inline
Side-by-side
election/election.go
View file @
bba3590a
...
...
@@ -258,7 +258,10 @@ func (election *Election) nextPhase(reason Reason) {
// Only tally if we have ballots
if
election
.
ballotBox
.
Size
()
!=
0
{
list
,
err
:=
election
.
Agreement
.
TallyList
()
if
err
==
nil
{
if
err
!=
nil
{
log
.
Println
(
"Election: error:"
,
err
)
log
.
Println
(
"Election: waiting for tallies from other servers"
)
}
else
{
tally
:=
election
.
ballotBox
.
Tally
(
list
)
election
.
Status
.
TalliedServers
[
election
.
ServerID
]
=
true
err
=
election
.
tallyBox
.
Put
(
tally
)
...
...
@@ -266,9 +269,8 @@ func (election *Election) nextPhase(reason Reason) {
panic
(
err
)
// Should not happen
}
election
.
server
.
Broadcast
(
network
.
NewMessage
(
MsgTally
,
tally
))
break
}
log
.
Println
(
"Should really wait for tallies from other servers !!! :D"
)
break
}
fallthrough
...
...
Write
Preview
Supports
Markdown
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