From ce879143266f9f60a1bbb65e6c96adc6f6d7e7c5 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Thu, 7 Jan 2021 11:14:32 +0800 Subject: [PATCH] Fix the 2/3 threshold calculation Co-authored-by: Danny Ryan --- specs/lightclient/sync-protocol.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/lightclient/sync-protocol.md b/specs/lightclient/sync-protocol.md index 156e6e78e..562b7b5bb 100644 --- a/specs/lightclient/sync-protocol.md +++ b/specs/lightclient/sync-protocol.md @@ -185,7 +185,7 @@ def process_light_client_update(store: LightClientStore, update: LightClientUpda store.valid_updates.append(update) if ( - sum(update.sync_committee_bits) * 3 > len(update.sync_committee_bits) * 2 + sum(update.sync_committee_bits) * 3 >= len(update.sync_committee_bits) * 2 and update.header != update.finality_header ): # Apply update if 2/3 quorum is reached and we have a finality proof