diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2016-09-23 17:26:21 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-09-23 17:26:21 +0200 |
commit | 5a9e4cca4050316d4d8a826282cbaa12804586b3 (patch) | |
tree | 70820efffe019016414dac29662f434957858308 | |
parent | e08789c72754944f965a2e3bb4ea2c41f50fa138 (diff) |
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.
-rw-r--r-- | brandt.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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; } |