From 33dcac811ab7db85f9d8adeb03f8891369dce2aa Mon Sep 17 00:00:00 2001 From: Sergei Boiko <127754187+satoshiotomakan@users.noreply.github.com> Date: Wed, 18 Dec 2024 15:15:09 +0700 Subject: [PATCH] [THORChain]: Update `chainId` and `rpc` (#4167) * [THORChain]: Update `chainId` and default `rpc` url * [THORChain]: Fix C++ tests * [THORChain]: Fix C++ tests --- registry.json | 4 ++-- tests/chains/Cosmos/THORChain/TWSwapTests.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/registry.json b/registry.json index 71b186efe08..87180cf17b8 100644 --- a/registry.json +++ b/registry.json @@ -3186,7 +3186,7 @@ "publicKeyType": "secp256k1", "hrp": "thor", "addressHasher": "sha256ripemd", - "chainId": "thorchain-mainnet-v1", + "chainId": "thorchain-1", "explorer": { "url": "https://viewblock.io/thorchain", "txPath": "/tx/", @@ -3197,7 +3197,7 @@ "info": { "url": "https://thorchain.org", "source": "https://gitlab.com/thorchain/thornode", - "rpc": "https://seed.thorchain.info", + "rpc": "https://thornode.ninerealms.com", "documentation": "https://docs.thorchain.org" } }, diff --git a/tests/chains/Cosmos/THORChain/TWSwapTests.cpp b/tests/chains/Cosmos/THORChain/TWSwapTests.cpp index df999de49ad..9492770c08f 100644 --- a/tests/chains/Cosmos/THORChain/TWSwapTests.cpp +++ b/tests/chains/Cosmos/THORChain/TWSwapTests.cpp @@ -307,7 +307,7 @@ TEST(TWTHORChainSwap, SwapRuneDoge) { // invoke swap const auto outputTWData_ = WRAPD(TWTHORChainSwapBuildSwap(inputTWData_.get())); const auto outputData = data(TWDataBytes(outputTWData_.get()), TWDataSize(outputTWData_.get())); - EXPECT_EQ(outputData.size(), 153ul); + EXPECT_EQ(outputData.size(), 144ul); // parse result in proto Proto::SwapOutput outputProto; EXPECT_TRUE(outputProto.ParseFromArray(outputData.data(), static_cast(outputData.size()))); @@ -322,6 +322,8 @@ TEST(TWTHORChainSwap, SwapRuneDoge) { auto& fee = *txInput.mutable_fee(); fee.set_gas(50000000); + // Override the chainId as it has been after a hardfork recently. + txInput.set_chain_id("thorchain-mainnet-v1"); txInput.set_account_number(75247); txInput.set_sequence(8); @@ -367,7 +369,7 @@ TEST(TWTHORChainSwap, SwapRuneBnbStreamParams) { // invoke swap const auto outputTWData_ = WRAPD(TWTHORChainSwapBuildSwap(inputTWData_.get())); const auto outputData = data(TWDataBytes(outputTWData_.get()), TWDataSize(outputTWData_.get())); - EXPECT_EQ(outputData.size(), 156ul); + EXPECT_EQ(outputData.size(), 147ul); // parse result in proto Proto::SwapOutput outputProto; EXPECT_TRUE(outputProto.ParseFromArray(outputData.data(), static_cast(outputData.size()))); @@ -382,6 +384,7 @@ TEST(TWTHORChainSwap, SwapRuneBnbStreamParams) { auto& fee = *txInput.mutable_fee(); fee.set_gas(50000000); + txInput.set_chain_id("thorchain-mainnet-v1"); txInput.set_account_number(76456); txInput.set_sequence(0);