-
Notifications
You must be signed in to change notification settings - Fork 12
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
Changed the function type of commitMetablock of Consensus contract from public to external #281
Conversation
…om public to external
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.
Thanks 👍
Some feedback.
// Anchor state root. | ||
anchorStateRoot(_metachainId, _rlpBlockHeader); | ||
|
||
CoreI core = assignments[_metachainId]; | ||
bytes32 metablockHash = goToCommittedRound(_metachainId); |
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 is call twice in below functions :
- assertCommit
- commitStateRoot
// Anchor state root. | ||
anchorStateRoot(_metachainId, _rlpBlockHeader); | ||
|
||
CoreI core = assignments[_metachainId]; |
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.
Core address is read three times. Is it possible to optimise this?
* @param _gasTargetDelta Gas target delta to open new metablock. | ||
* @param _kernelHash Kernel hash. | ||
*/ | ||
function commitStateRoot( |
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.
It's more readable if event is emitted by external function instead of private.
* @param _gasTargetDelta Gas target delta to open new metablock. | ||
* @param _kernelHash Kernel hash. | ||
*/ | ||
function commitStateRoot( |
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.
Naming can be improved.
As discussed with @deepesh-kn I am moving this ticket to parking lot. |
Thanks, but I will close this. |
fixes #245