diff --git a/bittensor_cli/src/bittensor/subtensor_interface.py b/bittensor_cli/src/bittensor/subtensor_interface.py index e3507d30..383e7f43 100644 --- a/bittensor_cli/src/bittensor/subtensor_interface.py +++ b/bittensor_cli/src/bittensor/subtensor_interface.py @@ -1249,6 +1249,9 @@ async def create_signed(call_to_sign, n): ) inner_hash = "" if mev_protection: + max_mev_era = 8 + if era is not None and era["period"] > max_mev_era: + era = {"period": max_mev_era} next_nonce = await self.substrate.get_account_next_index( keypair.ss58_address ) diff --git a/tests/e2e_tests/test_coldkey_swap.py b/tests/e2e_tests/test_coldkey_swap.py index 276d709a..b91fb543 100644 --- a/tests/e2e_tests/test_coldkey_swap.py +++ b/tests/e2e_tests/test_coldkey_swap.py @@ -272,6 +272,7 @@ def test_coldkey_swap_dispute(local_chain, wallet_setup): "Created for e2e coldkey swap dispute test", "--no-prompt", "--json-output", + "--no-mev-protection", ], ) create_payload = json.loads(create_sn.stdout) @@ -403,6 +404,7 @@ def test_coldkey_swap_dispute(local_chain, wallet_setup): "--new-coldkey", wallet_new.coldkeypub.ss58_address, "--no-prompt", + "--no-mev-protection", ], ) assert "ColdkeySwapDisputed" in execute.stderr, execute.stderr