|
9 | 9 | Checks EvoNodes |
10 | 10 |
|
11 | 11 | ''' |
12 | | -from _decimal import Decimal |
13 | 12 | from io import BytesIO |
14 | 13 |
|
15 | 14 | from test_framework.p2p import P2PInterface |
16 | 15 | from test_framework.messages import CBlock, CBlockHeader, CCbTx, CMerkleBlock, from_hex, hash256, msg_getmnlistd, \ |
17 | 16 | QuorumId, ser_uint256 |
18 | 17 | from test_framework.test_framework import DashTestFramework |
19 | 18 | from test_framework.util import ( |
20 | | - assert_equal, assert_greater_than_or_equal, p2p_port |
| 19 | + assert_equal, assert_greater_than_or_equal, |
21 | 20 | ) |
22 | 21 |
|
23 | 22 |
|
@@ -65,9 +64,6 @@ def run_test(self): |
65 | 64 | b_0 = self.nodes[0].getbestblockhash() |
66 | 65 | self.test_getmnlistdiff(null_hash, b_0, {}, [], expectedUpdated) |
67 | 66 |
|
68 | | - self.log.info("Test that EvoNodes registration is rejected before v19") |
69 | | - self.test_evo_is_rejected_before_v19() |
70 | | - |
71 | 67 | self.test_masternode_count(expected_mns_count=4, expected_evo_count=0) |
72 | 68 |
|
73 | 69 | self.activate_v19(expected_activation_height=900) |
@@ -193,37 +189,6 @@ def test_evo_protx_are_in_mnlist(self, evo_protx_list): |
193 | 189 | assert_equal(mn_list.get(mn)['type'], "Evo") |
194 | 190 | assert_equal(found, True) |
195 | 191 |
|
196 | | - def test_evo_is_rejected_before_v19(self): |
197 | | - bls = self.nodes[0].bls('generate') |
198 | | - collateral_address = self.nodes[0].getnewaddress() |
199 | | - funds_address = self.nodes[0].getnewaddress() |
200 | | - owner_address = self.nodes[0].getnewaddress() |
201 | | - voting_address = self.nodes[0].getnewaddress() |
202 | | - reward_address = self.nodes[0].getnewaddress() |
203 | | - |
204 | | - collateral_amount = 4000 |
205 | | - outputs = {collateral_address: collateral_amount, funds_address: 1} |
206 | | - collateral_txid = self.nodes[0].sendmany("", outputs) |
207 | | - self.generate(self.nodes[0], 8) |
208 | | - |
209 | | - rawtx = self.nodes[0].getrawtransaction(collateral_txid, 1) |
210 | | - collateral_vout = 0 |
211 | | - for txout in rawtx['vout']: |
212 | | - if txout['value'] == Decimal(collateral_amount): |
213 | | - collateral_vout = txout['n'] |
214 | | - break |
215 | | - assert collateral_vout is not None |
216 | | - |
217 | | - ipAndPort = '127.0.0.1:%d' % p2p_port(len(self.nodes)) |
218 | | - operatorReward = len(self.nodes) |
219 | | - |
220 | | - try: |
221 | | - self.nodes[0].protx('register_evo', collateral_txid, collateral_vout, ipAndPort, owner_address, bls['public'], voting_address, operatorReward, reward_address, funds_address, True) |
222 | | - # this should never succeed |
223 | | - assert False |
224 | | - except: |
225 | | - self.log.info("protx_evo rejected") |
226 | | - |
227 | 192 | def test_masternode_count(self, expected_mns_count, expected_evo_count): |
228 | 193 | mn_count = self.nodes[0].masternode('count') |
229 | 194 | assert_equal(mn_count['total'], expected_mns_count + expected_evo_count) |
|
0 commit comments