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

Handle JsonRpcError in _estimate_fee_basic #1658

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion src/jmclient/blockchaininterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,12 @@ def _estimate_fee_basic(self,
# cannot be estimated in that case the 2nd highest priority
# should be used instead of falling back to hardcoded values
tries = 2 if conf_target == 1 else 1
rpc_result = None
for i in range(tries):
rpc_result = self._rpc('estimatesmartfee', [conf_target + i])
try:
rpc_result = self._rpc('estimatesmartfee', [conf_target + i])
except JsonRpcError:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably could log.debug error details here too, before continue.

continue
if not rpc_result:
# in case of connection error:
return None
Expand Down
Loading