diff --git a/tests/api_mock_test.py b/tests/api_mock_test.py index b7bd7d6..5445809 100644 --- a/tests/api_mock_test.py +++ b/tests/api_mock_test.py @@ -10,7 +10,7 @@ @pytest.fixture() def non_mocked_hosts() -> list: - return ["9c-main-miner-3.nine-chronicles.com"] + return ["9c-main-full-state.nine-chronicles.com"] @pytest.mark.parametrize("has_header", [True, False]) diff --git a/tests/kms_test.py b/tests/kms_test.py index 3312ac5..9da0d5c 100644 --- a/tests/kms_test.py +++ b/tests/kms_test.py @@ -4,6 +4,7 @@ import bencodex import pytest +from gql.transport.exceptions import TransportQueryError from world_boss.app.enums import NetworkType from world_boss.app.kms import HEADLESS_URLS, MINER_URLS, signer @@ -41,7 +42,7 @@ def test_transfer_assets(fx_session) -> None: tx = bencodex.loads(bytes.fromhex(payload)) assert tx[b"n"] == 2 action = tx[b"a"][0] - assert action["type_id"] == "transfer_assets" + assert action["type_id"] == "transfer_assets3" plain_value = action["values"] assert plain_value["memo"] == "test" assert len(plain_value["recipients"]) == 1 @@ -51,9 +52,8 @@ def test_transfer_assets(fx_session) -> None: async def test_stage_transactions_async(fx_session, fx_mainnet_transactions): fx_session.add_all(fx_mainnet_transactions) fx_session.flush() - result = await signer.stage_transactions_async(NetworkType.INTERNAL) - for transaction in fx_mainnet_transactions: - assert transaction.tx_id in result + with pytest.raises(TransportQueryError): + await signer.stage_transactions_async(NetworkType.INTERNAL) @pytest.mark.asyncio @@ -95,7 +95,9 @@ def test_stage_transaction(fx_session, fx_mainnet_transactions): fx_session.flush() urls = HEADLESS_URLS[NetworkType.INTERNAL] for url in urls: - assert signer.stage_transaction(url, tx) == tx.tx_id + with pytest.raises(TransportQueryError) as e: + signer.stage_transaction(url, tx) + assert tx.tx_id in str(e.value) def test_query_transaction_result(fx_session, fx_mainnet_transactions): diff --git a/world_boss/app/kms.py b/world_boss/app/kms.py index 03ad70f..6176fc6 100644 --- a/world_boss/app/kms.py +++ b/world_boss/app/kms.py @@ -22,7 +22,7 @@ MINER_URLS: dict[NetworkType, str] = { NetworkType.MAIN: "https://9c-main-full-state.nine-chronicles.com/graphql", - NetworkType.INTERNAL: "http://9c-internal-miner-1.nine-chronicles.com/graphql", + NetworkType.INTERNAL: "http://9c-internal-validator-5.nine-chronicles.com/graphql", } HEADLESS_URLS: dict[NetworkType, typing.List[str]] = {