Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
vgorkavenko committed Sep 19, 2024
1 parent deb9bef commit 622b20b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/csm/csm.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,12 @@ def build_report(self, blockstamp: ReferenceBlockStamp) -> tuple:

distributed, shares, log = self.calculate_distribution(blockstamp)

if distributed != sum(shares.values()):
raise InconsistentData(f"Invalid distribution: {sum(shares.values())=} != {distributed=}")

log_cid = self.publish_log(log)

if not distributed:
if not distributed and not shares:
logger.info({"msg": "No shares distributed in the current frame"})
return ReportData(
self.report_contract.get_consensus_version(blockstamp.block_hash),
Expand Down

0 comments on commit 622b20b

Please sign in to comment.