Skip to content

Commit

Permalink
revert the changes pertaining to introducing network ID in the config…
Browse files Browse the repository at this point in the history
… file
  • Loading branch information
ckeshava committed Jul 8, 2024
1 parent 7594eb3 commit f136db7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
4 changes: 0 additions & 4 deletions .ci-config/rippled.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ validators.txt
# Note: The version of rippled you use this config with must have an implementation for the amendments you attempt to enable or it will crash.
# If you need the version of rippled to be more up to date, you may need to make a comment on this repo: https://github.com/WietseWind/docker-rippled

# network_id is required otherwise it's read as None
[network_id]
63456

[features]
# Devnet amendments as of June 28th, 2023
NegativeUNL
Expand Down
24 changes: 24 additions & 0 deletions tests/integration/sugar/test_network_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from unittest import TestCase

from xrpl.asyncio.transaction.main import _RESTRICTED_NETWORKS
from xrpl.clients import WebsocketClient
from xrpl.models.transactions import AccountSet
from xrpl.transaction import autofill

_FEE = "0.00001"


# TODO: move to test_transaction and use the standard integration test setup
class TestNetworkID(TestCase):
# Autofill should override tx networkID for network with ID > 1024
# and build_version from 1.11.0 or later.
def test_networkid_override(self):
with WebsocketClient("wss://hooks-testnet-v3.xrpl-labs.com") as client:
tx = AccountSet(
account="rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
fee=_FEE,
domain="www.example.com",
)
tx_autofilled = autofill(tx, client)
self.assertGreaterEqual(client.network_id, _RESTRICTED_NETWORKS)
self.assertEqual(tx_autofilled.network_id, client.network_id)
17 changes: 0 additions & 17 deletions tests/integration/sugar/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,23 +216,6 @@ async def test_calculate_payment_fee(self, client):
expected_fee = await get_fee(client)
self.assertEqual(payment_autofilled.fee, expected_fee)

@test_async_and_sync(
globals(),
["xrpl.transaction.autofill"],
)
# Autofill should populate the tx networkID and build_version from 1.11.0 or later.
async def test_autofill_populate_networkid(self, client):
tx = AccountSet(
account="rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
fee=FEE,
domain="www.example.com",
)
await autofill(tx, client)
self.assertEqual(client.network_id, 63456)

# the build_version changes with newer releases of rippled
self.assertEqual(client.build_version, "2.2.0-b3")


class TestSubmitAndWait(IntegrationTestCase):
@test_async_and_sync(
Expand Down

0 comments on commit f136db7

Please sign in to comment.