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
En 8063 fix after rv audit #2463
En 8063 fix after rv audit #2463
Conversation
@@ -1921,7 +1888,7 @@ func (d *delegation) getFund(key []byte) (*Fund, error) { | |||
} | |||
|
|||
func (d *delegation) createAndSaveNextFund(address []byte, value *big.Int, fundType uint32) ([]byte, error) { |
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.
createAndSaveNexKeyFund
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.
Done.
@@ -1921,7 +1888,7 @@ func (d *delegation) getFund(key []byte) (*Fund, error) { | |||
} | |||
|
|||
func (d *delegation) createAndSaveNextFund(address []byte, value *big.Int, fundType uint32) ([]byte, error) { | |||
fundKey, fund := d.createNextFund(address, value, fundType) | |||
fundKey, fund := d.createNextKeyFund(address, value, fundType) | |||
err := d.saveFund(fundKey, fund) |
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.
saveKeyFund
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.
Done.
@@ -1887,9 +1887,9 @@ func (d *delegation) getFund(key []byte) (*Fund, error) { | |||
return dFund, nil | |||
} | |||
|
|||
func (d *delegation) createAndSaveNextFund(address []byte, value *big.Int, fundType uint32) ([]byte, error) { | |||
func (d *delegation) createAndSaveNexKeyFund(address []byte, value *big.Int, fundType uint32) ([]byte, error) { |
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.
createAndSaveNextKeyFund ? however KeyFund does not sound so right. and saveKeyFund might be renamed again to saveFund - as it only safe the fund data.
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.
Done.
Removed duplicated code and implemented other small optimizations.