Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Fix "make it" and bug in relay (not opening next round)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludovic Barman committed Apr 1, 2018
1 parent 7760353 commit 5837256
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/prifi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CellSizeDown = 17500
RelayWindowSize = 5
DCNetType = "Simple"
EnforceSameVersionOnNodes = true
OverrideLogLevel = 2
OverrideLogLevel = 3
ForceConsoleColor = true
RelayUseOpenClosedSlots = true
RelayUseDummyDataDown = false
Expand Down
6 changes: 5 additions & 1 deletion prifi-lib/relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ func (p *PriFiLibRelayInstance) upstreamPhase2b_extractPayload() error {

//decode all clients and trustees
for _, s := range clientSlices {
log.Lvl1("Decoding", roundID, len(s))
p.relayState.DCNet.DecodeClient(roundID, s)
}
for _, s := range trusteesSlices {
Expand Down Expand Up @@ -490,6 +489,11 @@ func (p *PriFiLibRelayInstance) upstreamPhase3_finalizeRound(roundID int32) erro

p.relayState.roundManager.CloseRound()

// we just closed that round. If there is any other round opened (window > 1), directly prepare to decode it
if roundOpened, nextRoundID := p.relayState.roundManager.currentRound(); roundOpened {
p.relayState.DCNet.DecodeStart(nextRoundID)
}

return nil
}

Expand Down
1 change: 0 additions & 1 deletion simul.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ configdir="config"
defaultIdentitiesDir="identities_default" # in $configdir
realIdentitiesDir="identities_real" # in $configdir

# unimportant variable (but do not change, ofc)
sleeptime_between_spawns=1 # time in second between entities launch in all-localhost part


Expand Down
2 changes: 2 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ realIdentitiesDir="identities_real" # in $configdir

cothorityBranchRequired="master" # the branch required for the cothority (SDA) framework

sleeptime_between_spawns=1 # time in second between entities launch in "make it"

source "helpers.lib.sh"

# ------------------------
Expand Down

0 comments on commit 5837256

Please sign in to comment.