-
Notifications
You must be signed in to change notification settings - Fork 224
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
Bugfix/delegation type fixes #649
Conversation
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, just a question around owner()
} | ||
|
||
pub fn amount(&self) -> &Coin { | ||
&self.amount | ||
} | ||
|
||
pub fn node_identity(&self) -> &String { | ||
&self.node_identity | ||
pub fn owner(&self) -> &HumanAddr { |
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.
Do we want to return HumanAddr
here, it usually easier if a function returns an owned type
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've just looked at the usages of the owner()
call and you're absolutely right. It would definitely be way easier as in all of the places the call is followed by a clone()
anyway.
Fixes issue where delegation owner (i.e. person who delegated stake) would mistakenly be referred to as "node_identity"