mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Merge #6270: fix: remove mn_rr fork usage from functional test of EHF
056d869571
refactor: use testdummy in feature_mnehf functional test, removed useless checks (Konstantin Akimov)0351469bb5
refactor: removed duplicated meaningless condition from Check mnhftx (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented Using mn_rr in feature_mnehf.py is a blocker for burying mn_rr fork. ## What was done? Removed useless conditions, uses testdummy fork instead mn_rr in ehf functional test. ## How Has This Been Tested? Run it `test/functional/feature_mnehf.py` ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: utACK056d869571
PastaPastaPasta: utACK056d869571
Tree-SHA512: aa016dc21fee3afdb5a4172e757cdd0b92867c23eb5241287f641d3c97d363ab1c46eba06423481ecc7ba05f6c0010b65eadfe77d4a1fd6074706cc6f3a71309
This commit is contained in:
commit
d754799580
@ -231,12 +231,9 @@ std::optional<CMNHFManager::Signals> CMNHFManager::ProcessBlock(const CBlock& bl
|
||||
return signals;
|
||||
}
|
||||
for (const auto& versionBit : new_signals) {
|
||||
if (Params().IsValidMNActivation(versionBit, pindex->GetMedianTimePast())) {
|
||||
signals.insert({versionBit, mined_height});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
AddToCache(signals, pindex);
|
||||
return signals;
|
||||
} catch (const std::exception& e) {
|
||||
|
@ -19,7 +19,6 @@ from test_framework.messages import (
|
||||
from test_framework.test_framework import DashTestFramework
|
||||
from test_framework.util import (
|
||||
assert_equal,
|
||||
assert_greater_than,
|
||||
get_bip9_details,
|
||||
)
|
||||
|
||||
@ -133,12 +132,10 @@ class MnehfTest(DashTestFramework):
|
||||
self.set_sporks()
|
||||
self.activate_v20()
|
||||
self.log.info(f"After v20 activation should be plenty of blocks: {node.getblockcount()}")
|
||||
assert_greater_than(node.getblockcount(), 900)
|
||||
assert_equal(get_bip9_details(node, 'testdummy')['status'], 'defined')
|
||||
|
||||
self.log.info("Mine a quorum...")
|
||||
self.mine_quorum()
|
||||
assert_equal(get_bip9_details(node, 'testdummy')['status'], 'defined')
|
||||
self.check_fork('defined')
|
||||
|
||||
key = ECKey()
|
||||
key.generate()
|
||||
@ -154,9 +151,6 @@ class MnehfTest(DashTestFramework):
|
||||
self.log.info("Checking correctness of requestId and quorumHash")
|
||||
assert_equal(mnehf_payload.quorumHash, int(self.mninfo[0].node.quorum("selectquorum", 100, 'a0eee872d7d3170dd20d5c5e8380c92b3aa887da5f63d8033289fafa35a90691')["quorumHash"], 16))
|
||||
|
||||
assert_equal(get_bip9_details(node, 'testdummy')['status'], 'defined')
|
||||
assert_equal(get_bip9_details(node, 'mn_rr')['status'], 'defined')
|
||||
|
||||
ehf_tx_sent = self.send_tx(ehf_tx)
|
||||
self.log.info(f"ehf tx: {ehf_tx_sent}")
|
||||
ehf_unknown_tx_sent = self.send_tx(ehf_unknown_tx)
|
||||
@ -251,8 +245,8 @@ class MnehfTest(DashTestFramework):
|
||||
|
||||
ehf_tx_new_start = self.create_mnehf(28, pubkey)
|
||||
|
||||
self.log.info("activate MN_RR also by enabling spork 24")
|
||||
assert_equal(get_bip9_details(node, 'mn_rr')['status'], 'defined')
|
||||
self.log.info("Test spork 24 (EHF)")
|
||||
self.check_fork('defined')
|
||||
self.nodes[0].sporkupdate("SPORK_24_TEST_EHF", 0)
|
||||
self.wait_for_sporks_same()
|
||||
|
||||
@ -268,8 +262,6 @@ class MnehfTest(DashTestFramework):
|
||||
self.check_fork('defined')
|
||||
self.slowly_generate_batch(12 * 4)
|
||||
self.check_fork('active')
|
||||
self.log.info(f"bip9: {get_bip9_details(node, 'mn_rr')}")
|
||||
assert_equal(get_bip9_details(node, 'mn_rr')['status'], 'active')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user