diff --git a/tests/existential_deposits_test.py b/tests/existential_deposits_test.py index 7adb387..2d80d60 100644 --- a/tests/existential_deposits_test.py +++ b/tests/existential_deposits_test.py @@ -3,7 +3,6 @@ from substrateinterface import SubstrateInterface, Keypair from tools.utils import get_existential_deposit from tools.constants import WS_URL -from peaq.extrinsic import transfer @pytest.mark.substrate @@ -19,17 +18,4 @@ def setUp(self): def test_local_token(self): token = self.get_existential_deposit() - self.assertGreater(token, 2) - token /= 2 - - # Execute -> Send local token to another account but below the Exitential Deposits - receipt = transfer( - self.substrate, - self.alice, - self.kp.ss58_address, - token, - 1 - ) - - # Check: the error happens - self.assertFalse(receipt.is_success) + self.assertEqual(token, 0) diff --git a/tools/monkey/monkey_3rd_substrate_interface.py b/tools/monkey/monkey_3rd_substrate_interface.py index cb6a71f..53f3895 100644 --- a/tools/monkey/monkey_3rd_substrate_interface.py +++ b/tools/monkey/monkey_3rd_substrate_interface.py @@ -33,6 +33,8 @@ def monkey_submit_extrinsic(self, extrinsic: GenericExtrinsic, wait_for_inclusio included_block = None tx_identifier = None for i in range(5): + if now_block_num - i < 1 or tx_identifier: + break print(f'Checking block {now_block_num - i}') block_hash = self.get_block_hash(now_block_num - i) block = self.get_block(block_hash) @@ -43,8 +45,6 @@ def monkey_submit_extrinsic(self, extrinsic: GenericExtrinsic, wait_for_inclusio print(f'Extrinsic {result.extrinsic_hash} is included in block {included_block}') tx_identifier = f'{included_block}-{index}' break - if tx_identifier: - break if not tx_identifier: raise SubstrateRequestException( f'Extrinsic {result.extrinsic_hash} is not included in the block after 3 blocks, invalid')