From 5a9e4cca4050316d4d8a826282cbaa12804586b3 Mon Sep 17 00:00:00 2001 From: Markus Teich Date: Fri, 23 Sep 2016 17:26:21 +0200 Subject: [PATCH] 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. --- brandt.c | 10 +++------- 1 file 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, if (!gcry_mpi_test_bit (ad->round_progress, i)) return; - if (msg_decrypt == ad->cur_round) - { - report_outcome (ad, atype, outcome); - return; - } - if (ad->seller_mode && msg_decrypt == ad->cur_round && !ad->outcome_public) { /* all bidders msg_decrypt received, broadcast combined msg_decrypt */ @@ -347,8 +341,10 @@ advance_round (struct BRANDT_Auction *ad, return; } ad->bcast (ad->closure, buf, buflen); + } - /* now we are done as seller and can determine the outcome */ + if (msg_decrypt == ad->cur_round) + { report_outcome (ad, atype, outcome); return; }