Skip to content

Commit

Permalink
Log quorum (#61)
Browse files Browse the repository at this point in the history
* Log quorum

* Version 0.3.26

* Review fix

* Review fix 2

* Fix lint
  • Loading branch information
evgeny-stakewise authored Sep 26, 2023
1 parent 34047e0 commit aad3a4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sw-utils"
version = "0.3.25"
version = "0.3.26"
description = "StakeWise Python utils"
authors = ["StakeWise Labs <[email protected]>"]
license = "GPL-3.0-or-later"
Expand Down
3 changes: 3 additions & 0 deletions sw_utils/ipfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ async def _upload(self, coros: list) -> str:
ipfs_hash = max(ipfs_hashes, key=ipfs_hashes.get) # type: ignore
count = ipfs_hashes[ipfs_hash]
if count < self.quorum:
logger.warning(
'quorum: %s, ipfs hashes: %s', self.quorum, ', '.join(ipfs_hashes.keys())
)
raise IpfsException('Failed to reach the uploads quorum')

return ipfs_hash
Expand Down

0 comments on commit aad3a4f

Please sign in to comment.