-
Notifications
You must be signed in to change notification settings - Fork 272
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
Hotfixes, just fresh from the oven! #2375
Conversation
try: | ||
transaction_fee = self.payload['gas'] * self.payload['gasPrice'] | ||
except KeyError: | ||
return self.default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, and I actually changed it a bit more since then.
@@ -1359,7 +1359,7 @@ def node_details(node): | |||
"last_seen": last_seen, | |||
"fleet_state": node.fleet_state_checksum or 'unknown', | |||
"fleet_state_icon": fleet_icon, | |||
"domain": node.learning_domain, | |||
"domain": node.serving_domain, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will help with the monitor - the other problematic line was
nucypher/nucypher/network/nodes.py
Line 353 in ad6b6bd
node_domain = node.domain.decode('utf-8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My current workaround for the monitor - derekpierre@ad2e2d0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's line is tricky, because I know that it doesn't fail in other contexts (e.g., when it's a file-based node storage). Not sure how to proceed here until #2356 is merged. What about an ugly try block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with the ugly for now - with a todo to fix properly later. Just gets us moving before a more comprehensive solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of this for line 353?
try: # Workaround until #2356 is fixed
node_domain = node.domain.decode('utf-8')
except:
node_domain = node.serving_domain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. We can be specific about the AttributeError
- but looks good to me anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it's an attribute error or a BytestringSplitter error. In any case, it's ugly af and we need to fix #2356 soon 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a follow-up PR we can collapse learning_domain
and serving_domain
into domain
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎸
transaction_fee = self.payload['gas'] * self.payload['gasPrice'] | ||
except KeyError: | ||
return self.default | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think else
is necessary here. You're returning from the exception branch anyway.
I will not approve unless this PR has a fix for this:
--edit |
No description provided.