-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: adjust GetPaymentsLimit to work correctly with historical blocks, adjust sb params on regtest, tweak tests #5641
fix: adjust GetPaymentsLimit to work correctly with historical blocks, adjust sb params on regtest, tweak tests #5641
Conversation
6fb102b
to
ae33635
Compare
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.
ACK 👍
ae33635
to
efce411
Compare
rebased on develop and added efce411 |
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.
utACK
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.
utACK for squash merge; a few comments but nothing blocking
@@ -494,14 +494,16 @@ CAmount CSuperblock::GetPaymentsLimit(int nBlockHeight) | |||
return 0; | |||
} | |||
|
|||
const CBlockIndex* tipIndex = ::ChainActive().Tip(); | |||
const auto v20_state = llmq::utils::GetV20State(tipIndex); | |||
const CBlockIndex* pindex = ::ChainActive().Tip(); |
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.
nit: could make this gsl::not_null
self.p0_hash = self.nodes[0].gobject("submit", "0", 1, proposal_time, p0_collateral_prepare["hex"], p0_collateral_prepare["collateralHash"]) | ||
self.p1_hash = self.nodes[0].gobject("submit", "0", 1, proposal_time, p1_collateral_prepare["hex"], p1_collateral_prepare["collateralHash"]) | ||
self.p2_hash = self.nodes[0].gobject("submit", "0", 1, proposal_time, p2_collateral_prepare["hex"], p2_collateral_prepare["collateralHash"]) |
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.
nit: would have been nice if these "self." only changes were in their own commit for easier review
Issue being fixed or feature implemented
Noticed a couple of things while I was trying to figure out if an issue @knst mentioned in #5627 could actually exist:
GetPaymentsLimit()
won't work correctly with historical blocks rn. We don't use it that way internally but it could be done via rpc and it should provide correct results.feature_governance.py
doesn't test v20 switching states. There's also no "sb on v20 activation block" test.NOTE: based on #5639 atmWhat was done?
fix it, pls see individual commits
How Has This Been Tested?
run tests
Breaking Changes
n/a
Checklist: