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
64f23752
Commit
64f23752
authored
2 years ago
by
benjamin
Browse files
Options
Downloads
Patches
Plain Diff
made message status updates only come from pickup up the message from the network
parent
5f4afe50
No related branches found
No related tags found
4 merge requests
!510
Release
,
!419
rewrote the health tracker to both consider if there are waiting rounds and...
,
!397
Fully Decentralized channels
,
!340
Project/channels
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
channels/sendTracker.go
+11
-7
11 additions, 7 deletions
channels/sendTracker.go
with
11 additions
and
7 deletions
channels/sendTracker.go
+
11
−
7
View file @
64f23752
...
@@ -95,14 +95,14 @@ func loadSendTracker(net Client, kv *versioned.KV, trigger triggerEventFunc,
...
@@ -95,14 +95,14 @@ func loadSendTracker(net Client, kv *versioned.KV, trigger triggerEventFunc,
st
.
load
()
st
.
load
()
//denote all unsent messages as failed and clear
//denote all unsent messages as failed and clear
for
uuid
:=
range
st
.
unsent
{
for
uuid
,
t
:=
range
st
.
unsent
{
updateStatus
(
uuid
,
cryptoChannel
.
MessageID
{}
,
updateStatus
(
uuid
,
t
.
MsgID
,
time
.
Time
{},
rounds
.
Round
{},
Failed
)
time
.
Time
{},
rounds
.
Round
{},
Failed
)
}
}
st
.
unsent
=
make
(
map
[
uint64
]
*
tracked
)
st
.
unsent
=
make
(
map
[
uint64
]
*
tracked
)
//register to check all outstanding rounds when the network becomes healthy
//register to check all outstanding rounds when the network becomes healthy
var
callBackID
uint64
/*
var callBackID uint64
callBackID = net.AddHealthCallback(func(f bool) {
callBackID = net.AddHealthCallback(func(f bool) {
if !f {
if !f {
return
return
...
@@ -116,7 +116,7 @@ func loadSendTracker(net Client, kv *versioned.KV, trigger triggerEventFunc,
...
@@ -116,7 +116,7 @@ func loadSendTracker(net Client, kv *versioned.KV, trigger triggerEventFunc,
}
}
st.net.GetRoundResults(getRoundResultsTimeout, rr.callback, rr.round)
st.net.GetRoundResults(getRoundResultsTimeout, rr.callback, rr.round)
}
}
})
})
*/
return
st
return
st
}
}
...
@@ -315,19 +315,19 @@ func (st *sendTracker) handleSend(uuid uint64,
...
@@ -315,19 +315,19 @@ func (st *sendTracker) handleSend(uuid uint64,
t
.
RoundID
=
round
.
ID
t
.
RoundID
=
round
.
ID
//add the roundID
//add the roundID
roundsList
,
existsRound
:=
st
.
byRound
[
round
.
ID
]
roundsList
,
_
:=
st
.
byRound
[
round
.
ID
]
st
.
byRound
[
round
.
ID
]
=
append
(
roundsList
,
t
)
st
.
byRound
[
round
.
ID
]
=
append
(
roundsList
,
t
)
//add the round
//add the round
st
.
byMessageID
[
messageID
]
=
t
st
.
byMessageID
[
messageID
]
=
t
if
!
existsRound
{
/*
if !existsRound {
rr := &roundResults{
rr := &roundResults{
round: round.ID,
round: round.ID,
st: st,
st: st,
}
}
st.net.GetRoundResults(getRoundResultsTimeout, rr.callback, rr.round)
st.net.GetRoundResults(getRoundResultsTimeout, rr.callback, rr.round)
}
}
*/
//store the changed list to disk
//store the changed list to disk
err
:=
st
.
storeSent
()
err
:=
st
.
storeSent
()
...
@@ -374,6 +374,10 @@ func (st *sendTracker) MessageReceive(messageID cryptoChannel.MessageID) bool {
...
@@ -374,6 +374,10 @@ func (st *sendTracker) MessageReceive(messageID cryptoChannel.MessageID) bool {
st
.
byRound
[
msgData
.
RoundID
]
=
newRoundList
st
.
byRound
[
msgData
.
RoundID
]
=
newRoundList
}
}
if
err
:=
st
.
storeSent
();
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"failed to store the updated sent list: %+v"
,
err
)
}
return
true
return
true
}
}
...
...
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