@@ -284,14 +284,6 @@ def run_test(self):
284284 self .validate_credit_pool_balance (locked_1 )
285285
286286 self .log .info ("Testing asset unlock..." )
287- asset_unlock_tx_index_too_far = self .create_assetunlock (10001 , COIN , pubkey )
288- tx_too_far_index = self .send_tx (asset_unlock_tx_index_too_far )
289- node .generate (1 )
290- self .sync_all ()
291- self .mempool_size += 1
292- self .check_mempool_size ()
293- self .log .info ("Checking that `asset_unlock_tx_index_too_far` not mined yet..." )
294- self .ensure_tx_is_not_mined (tx_too_far_index )
295287
296288 self .log .info ("Generating several txes by same quorum...." )
297289 self .validate_credit_pool_balance (locked_1 )
@@ -323,17 +315,11 @@ def run_test(self):
323315 self .mempool_size += 1
324316 self .check_mempool_size ()
325317 self .validate_credit_pool_balance (locked_1 )
326- self .log .info ("Mining one block - index '10001' can't be included in this block" )
327318 node .generate (1 )
328319 self .sync_all ()
329320 self .validate_credit_pool_balance (locked_1 - COIN )
330321 self .mempool_size -= 1
331322 self .check_mempool_size ()
332- self .log .info ("Tx should not be mined yet... mine one more block" )
333- node .generate (1 )
334- self .sync_all ()
335- self .mempool_size -= 1
336- self .check_mempool_size ()
337323 block_asset_unlock = node .getrawtransaction (asset_unlock_tx .rehash (), 1 )['blockhash' ]
338324
339325 self .send_tx (asset_unlock_tx ,
@@ -346,21 +332,17 @@ def run_test(self):
346332 expected_error = "bad-assetunlock-duplicated-index" ,
347333 reason = "double index" )
348334
349- self .log .info ("Checking tx with too far index is mined too - it is not too far anymore..." )
350- self .validate_credit_pool_balance (locked_1 - 2 * COIN )
351- self .nodes [0 ].getrawtransaction (tx_too_far_index , 1 )['blockhash' ]
352-
353335 self .log .info ("Mining next quorum to check tx 'asset_unlock_tx_late' is still valid..." )
354336 self .mine_quorum ()
355337 self .log .info ("Checking credit pool amount is same..." )
356- self .validate_credit_pool_balance (locked_1 - 2 * COIN )
338+ self .validate_credit_pool_balance (locked_1 - 1 * COIN )
357339 self .check_mempool_result (tx = asset_unlock_tx_late , result_expected = {'allowed' : True })
358340 self .log .info ("Checking credit pool amount still is same..." )
359- self .validate_credit_pool_balance (locked_1 - 2 * COIN )
341+ self .validate_credit_pool_balance (locked_1 - 1 * COIN )
360342 self .send_tx (asset_unlock_tx_late )
361343 node .generate (1 )
362344 self .sync_all ()
363- self .validate_credit_pool_balance (locked_1 - 3 * COIN )
345+ self .validate_credit_pool_balance (locked_1 - 2 * COIN )
364346
365347 self .log .info ("Generating many blocks to make quorum far behind (even still active)..." )
366348 self .slowly_generate_batch (too_late_height - node .getblock (node .getbestblockhash ())["height" ] - 1 )
@@ -385,15 +367,15 @@ def run_test(self):
385367 self .validate_credit_pool_balance (locked_1 )
386368 for inode in self .nodes :
387369 inode .reconsiderblock (block_to_reconsider )
388- self .validate_credit_pool_balance (locked_1 - 3 * COIN )
370+ self .validate_credit_pool_balance (locked_1 - 2 * COIN )
389371
390372 self .log .info ("Forcibly mining asset_unlock_tx_too_late and ensure block is invalid..." )
391373 self .create_and_check_block ([asset_unlock_tx_too_late ], expected_error = "bad-assetunlock-not-active-quorum" )
392374
393375 node .generate (1 )
394376 self .sync_all ()
395377
396- self .validate_credit_pool_balance (locked_1 - 3 * COIN )
378+ self .validate_credit_pool_balance (locked_1 - 2 * COIN )
397379 self .validate_credit_pool_balance (block_hash = block_hash_1 , expected = locked_1 )
398380
399381 self .log .info ("Checking too big withdrawal... expected to not be mined" )
0 commit comments