Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
elixxir
client
Commits
1995f755
Commit
1995f755
authored
3 years ago
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
attempt to fix GetRoundResults
parent
65019043
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!170
Release
,
!118
attempt to fix GetRoundResults
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/results.go
+14
-9
14 additions, 9 deletions
api/results.go
with
14 additions
and
9 deletions
api/results.go
+
14
−
9
View file @
1995f755
...
@@ -158,12 +158,9 @@ func (c *Client) getRoundResults(roundList []id.Round, timeout time.Duration,
...
@@ -158,12 +158,9 @@ func (c *Client) getRoundResults(roundList []id.Round, timeout time.Duration,
roundCallback
(
false
,
true
,
roundsResults
)
roundCallback
(
false
,
true
,
roundsResults
)
return
return
case
roundReport
:=
<-
sendResults
:
case
roundReport
:=
<-
sendResults
:
// Skip if the round is nil (unknown from historical rounds)
// Skip if the round is timed out, meaning unknown from historical rounds
// they default to timed out, so correct behavior is preserved
// or timed out on RoundEvents channel
if
roundReport
.
RoundInfo
==
nil
{
if
roundReport
.
TimedOut
{
allRoundsSucceeded
=
false
numResults
--
}
else
if
roundReport
.
TimedOut
{
// Generate a message to track the timed out round
// Generate a message to track the timed out round
timeoutRequest
:=
&
pb
.
HistoricalRounds
{
timeoutRequest
:=
&
pb
.
HistoricalRounds
{
Rounds
:
[]
uint64
{
roundReport
.
RoundInfo
.
ID
},
Rounds
:
[]
uint64
{
roundReport
.
RoundInfo
.
ID
},
...
@@ -219,9 +216,17 @@ func (c *Client) getHistoricalRounds(msg *pb.HistoricalRounds,
...
@@ -219,9 +216,17 @@ func (c *Client) getHistoricalRounds(msg *pb.HistoricalRounds,
}
}
// Service historical rounds, sending back to the caller thread
// Service historical rounds, sending back to the caller thread
for
_
,
ri
:=
range
resp
.
Rounds
{
for
i
,
ri
:=
range
resp
.
Rounds
{
if
ri
==
nil
{
// Handle unknown by historical rounds
sendResults
<-
ds
.
EventReturn
{
RoundInfo
:
&
pb
.
RoundInfo
{
ID
:
msg
.
Rounds
[
i
]},
TimedOut
:
true
,
}
}
else
{
sendResults
<-
ds
.
EventReturn
{
sendResults
<-
ds
.
EventReturn
{
RoundInfo
:
ri
,
RoundInfo
:
ri
,
}
}
}
}
}
}
}
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