-
Notifications
You must be signed in to change notification settings - Fork 108
Mf/param updater update pos global params #543
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
Mf/param updater update pos global params #543
Conversation
|
|
||
| // Validate EndEpochNumber + StakeLockupEpochDuration <= CurrentEpochNumber. | ||
| if metadata.EndEpochNumber+bav.Params.StakeLockupEpochDuration > currentEpochNumber { | ||
| if metadata.EndEpochNumber+bav.GetStakeLockupEpochDuration(0) > currentEpochNumber { |
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.
Should we be fetching the StakeLockupEpochDuration based on a snapshot?
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.
Yes. We should be fetching those based on a snapshot. For now, I'm just keeping the existing behavior as before this PR. I'll update exactly which snapshot we should fetch once I know it. That'll just be swapping out the 0 for the correct EpochNumber relative to the CurrentEpochNumber.
|
|
||
| // Validate sufficient epochs have elapsed for validator to be unjailed. | ||
| if validatorEntry.JailedAtEpochNumber+bav.Params.ValidatorJailEpochDuration > currentEpochNumber { | ||
| if validatorEntry.JailedAtEpochNumber+bav.GetValidatorJailEpochDuration(0) > currentEpochNumber { |
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.
same thing here about using a snapshot
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.
Yup, you are correct. Same response as above.
lazynina
left a comment
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.
Just check that extra data isn't nil, but otherwise this looks good.
| minFeeRateNanosPerKB uint64, mempool *DeSoMempool, additionalOutputs []*DeSoOutput) ( | ||
| extraData map[string][]byte, minFeeRateNanosPerKB uint64, mempool *DeSoMempool, additionalOutputs []*DeSoOutput) ( | ||
| _txn *MsgDeSoTxn, _totalInput uint64, _changeAmount uint64, _fees uint64, _err 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.
can we add a if extraData == nil { extraData := make(map[string][]byte) } please?
Goes with deso-protocol/backend#496.