From aad3a4f8198769d6ec254ca926824f3504f1bd34 Mon Sep 17 00:00:00 2001 From: Evgeny Gusarov <123374581+evgeny-stakewise@users.noreply.github.com> Date: Tue, 26 Sep 2023 14:11:48 +0300 Subject: [PATCH] Log quorum (#61) * Log quorum * Version 0.3.26 * Review fix * Review fix 2 * Fix lint --- pyproject.toml | 2 +- sw_utils/ipfs.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 760c014..4b38c4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sw-utils" -version = "0.3.25" +version = "0.3.26" description = "StakeWise Python utils" authors = ["StakeWise Labs "] license = "GPL-3.0-or-later" diff --git a/sw_utils/ipfs.py b/sw_utils/ipfs.py index 6820e15..3ddf26b 100644 --- a/sw_utils/ipfs.py +++ b/sw_utils/ipfs.py @@ -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