Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log quorum #61

Merged
merged 5 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading