Skip to content
Snippets Groups Projects
Commit a6fae831 authored by Jonah Husson's avatar Jonah Husson
Browse files

Apply sendcmix changes to sendmanycmix

parent 7c6fb178
No related branches found
No related tags found
2 merge requests!117Release,!86M203/excluded rounds
...@@ -101,8 +101,14 @@ func sendManyCmixHelper(sender *gateway.Sender, ...@@ -101,8 +101,14 @@ func sendManyCmixHelper(sender *gateway.Sender,
attempted.Insert(bestRound) attempted.Insert(bestRound)
// Check excluded rounds for the selected best round // Check excluded rounds for the selected best round
if param.UseExcluded && param.ExcludedRounds != nil && param.ExcludedRounds.Has(bestRound.GetRoundId()) { if param.UseExcluded && param.ExcludedRounds != nil {
if param.ExcludedRounds.Has(bestRound.GetRoundId()) {
jww.WARN.Printf("Round %d is excluded, skipping...", bestRound.ID)
continue continue
} else {
param.ExcludedRounds.Insert(bestRound.GetRoundId())
jww.WARN.Printf("Added %d to excluded rounds", bestRound.ID)
}
} }
// Determine whether the selected round contains any nodes that are // Determine whether the selected round contains any nodes that are
...@@ -204,9 +210,6 @@ func sendManyCmixHelper(sender *gateway.Sender, ...@@ -204,9 +210,6 @@ func sendManyCmixHelper(sender *gateway.Sender,
// Return if it sends properly // Return if it sends properly
gwSlotResp := result.(*pb.GatewaySlotResponse) gwSlotResp := result.(*pb.GatewaySlotResponse)
if gwSlotResp.Accepted { if gwSlotResp.Accepted {
if param.UseExcluded && param.ExcludedRounds != nil {
param.ExcludedRounds.Insert(bestRound.GetRoundId())
}
m := fmt.Sprintf("Successfully sent to EphIDs %s (sources: [%s]) "+ m := fmt.Sprintf("Successfully sent to EphIDs %s (sources: [%s]) "+
"in round %d", ephemeralIDsString, recipientString, bestRound.ID) "in round %d", ephemeralIDsString, recipientString, bestRound.ID)
jww.INFO.Print(m) jww.INFO.Print(m)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment