aboutsummaryrefslogtreecommitdiff
path: root/brandt.c
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-09-23 17:26:21 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-09-23 17:26:21 +0200
commit5a9e4cca4050316d4d8a826282cbaa12804586b3 (patch)
tree70820efffe019016414dac29662f434957858308 /brandt.c
parente08789c72754944f965a2e3bb4ea2c41f50fa138 (diff)
downloadlibbrandt-5a9e4cca4050316d4d8a826282cbaa12804586b3.tar.gz
libbrandt-5a9e4cca4050316d4d8a826282cbaa12804586b3.zip
fix bug where seller would not broadcast last message to bidders
now the seller correctly computes the outcome _after_ broadcasting the last message to the bidders in private outcome auctions.
Diffstat (limited to 'brandt.c')
-rw-r--r--brandt.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/brandt.c b/brandt.c
index dd66e0c..d466fff 100644
--- a/brandt.c
+++ b/brandt.c
@@ -330,12 +330,6 @@ advance_round (struct BRANDT_Auction *ad,
330 if (!gcry_mpi_test_bit (ad->round_progress, i)) 330 if (!gcry_mpi_test_bit (ad->round_progress, i))
331 return; 331 return;
332 332
333 if (msg_decrypt == ad->cur_round)
334 {
335 report_outcome (ad, atype, outcome);
336 return;
337 }
338
339 if (ad->seller_mode && msg_decrypt == ad->cur_round && !ad->outcome_public) 333 if (ad->seller_mode && msg_decrypt == ad->cur_round && !ad->outcome_public)
340 { 334 {
341 /* all bidders msg_decrypt received, broadcast combined msg_decrypt */ 335 /* all bidders msg_decrypt received, broadcast combined msg_decrypt */
@@ -347,8 +341,10 @@ advance_round (struct BRANDT_Auction *ad,
347 return; 341 return;
348 } 342 }
349 ad->bcast (ad->closure, buf, buflen); 343 ad->bcast (ad->closure, buf, buflen);
344 }
350 345
351 /* now we are done as seller and can determine the outcome */ 346 if (msg_decrypt == ad->cur_round)
347 {
352 report_outcome (ad, atype, outcome); 348 report_outcome (ad, atype, outcome);
353 return; 349 return;
354 } 350 }