-
Notifications
You must be signed in to change notification settings - Fork 24
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
Don't stake for previously staked times #1083
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.
It's not perfect because it doesn't take into account different consensus algorithms, but I can live with this now.
However, please postpone merging this to after the release. I want this properly tested before it goes to the testnet.
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. Some minor coding suggestions below.
4e74f2e
to
9b11507
Compare
blockprod/src/detail/mod.rs
Outdated
pub fn generate_custom_id(&self, input_data: &GenerateBlockInputData) -> CustomId { | ||
match input_data { | ||
GenerateBlockInputData::PoS(pos_input_data) => { | ||
pos_input_data.stake_public_key().encode() |
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.
not sure how important that is but it's confusing that PoS returns the same value every time. Given that struct is called "generate" and for PoW it actually generates random value. Is it intended?
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. So the function "generates" for PoW, but for PoS the value is fixed. The struct has a "Generate" prefix because it's the struct for the "generate_block()" RPC call.
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 approving, but please wait for others to provide a second optinion after my changes.
cf5f769
to
0a9a5c8
Compare
See #1005 for more details.