mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
feat: generate less blocks in feature_asset_locks.py to make it faster
This commit is contained in:
parent
a51ade5cc9
commit
877aa08144
@ -812,9 +812,9 @@ public:
|
|||||||
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].bit = 11;
|
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].bit = 11;
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nStartTime = 0;
|
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nStartTime = 0;
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
|
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nWindowSize = 900;
|
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nWindowSize = 600;
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdStart = 900 / 5 * 4; // 80% of window size
|
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdStart = 600 / 5 * 4; // 80% of window size
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdMin = 900 / 5 * 3; // 60% of window size
|
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nThresholdMin = 600 / 5 * 3; // 60% of window size
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nFalloffCoeff = 5; // this corresponds to 10 periods
|
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].nFalloffCoeff = 5; // this corresponds to 10 periods
|
||||||
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].useEHF = true;
|
consensus.vDeployments[Consensus::DEPLOYMENT_WITHDRAWALS].useEHF = true;
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ class AssetLocksTest(DashTestFramework):
|
|||||||
|
|
||||||
|
|
||||||
self.log.info("generate many blocks to be sure that mempool is empty after expiring txes...")
|
self.log.info("generate many blocks to be sure that mempool is empty after expiring txes...")
|
||||||
self.generate_batch(60)
|
self.generate_batch(HEIGHT_DIFF_EXPIRING)
|
||||||
self.log.info("Checking that credit pool is not changed...")
|
self.log.info("Checking that credit pool is not changed...")
|
||||||
assert_equal(new_total, self.get_credit_pool_balance())
|
assert_equal(new_total, self.get_credit_pool_balance())
|
||||||
self.check_mempool_size()
|
self.check_mempool_size()
|
||||||
@ -624,7 +624,7 @@ class AssetLocksTest(DashTestFramework):
|
|||||||
self.log.info("Activate mn_rr...")
|
self.log.info("Activate mn_rr...")
|
||||||
locked = self.get_credit_pool_balance()
|
locked = self.get_credit_pool_balance()
|
||||||
self.activate_mn_rr(expected_activation_height=2500)
|
self.activate_mn_rr(expected_activation_height=2500)
|
||||||
self.log.info(f'height: {node.getblockcount()} credit: {self.get_credit_pool_balance()}')
|
self.log.info(f'mn-rr height: {node.getblockcount()} credit: {self.get_credit_pool_balance()}')
|
||||||
assert_equal(locked, self.get_credit_pool_balance())
|
assert_equal(locked, self.get_credit_pool_balance())
|
||||||
|
|
||||||
bt = node.getblocktemplate()
|
bt = node.getblocktemplate()
|
||||||
@ -650,8 +650,8 @@ class AssetLocksTest(DashTestFramework):
|
|||||||
|
|
||||||
def test_withdrawal_fork(self, node_wallet, node, pubkey):
|
def test_withdrawal_fork(self, node_wallet, node, pubkey):
|
||||||
self.log.info("Testing asset unlock after 'withdrawal' activation...")
|
self.log.info("Testing asset unlock after 'withdrawal' activation...")
|
||||||
self.activate_by_name('withdrawals')
|
|
||||||
assert softfork_active(node_wallet, 'withdrawals')
|
assert softfork_active(node_wallet, 'withdrawals')
|
||||||
|
self.log.info(f'post-withdrawals height: {node.getblockcount()} credit: {self.get_credit_pool_balance()}')
|
||||||
|
|
||||||
index = 501
|
index = 501
|
||||||
while index < 511:
|
while index < 511:
|
||||||
|
Loading…
Reference in New Issue
Block a user