fix: CTID issue (#2001)

fixes #1998
This commit is contained in:
Peter Chen
2025-04-16 11:55:12 -07:00
committed by GitHub
parent 4a5fee7548
commit 89eb962d85
8 changed files with 35 additions and 30 deletions

View File

@@ -67,6 +67,7 @@ TEST(RPCErrorsTest, StatusAsBool)
RippledError::rpcUNKNOWN_COMMAND,
RippledError::rpcTOO_BUSY,
RippledError::rpcNO_NETWORK,
RippledError::rpcWRONG_NETWORK,
RippledError::rpcACT_MALFORMED,
RippledError::rpcBAD_MARKET,
ClioError::RpcMalformedCurrency,

View File

@@ -71,6 +71,7 @@ constexpr auto kDEFAULT_OUT1 = R"({
"TakerPays": "300",
"TransactionType": "OfferCreate",
"hash": "2E2FBAAFF767227FE4381C4BE9855986A6B9F96C62F6E443731AB36F7BBB8A08",
"ctid": "C000006400640000",
"meta": {
"AffectedNodes": [
{
@@ -119,8 +120,10 @@ constexpr auto kDEFAULT_OUT2 = R"({
"TransactionIndex": 100,
"TransactionResult": "tesSUCCESS"
},
"ctid": "C000006400640000",
"tx_json": {
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"ctid": "C000006400640000",
"date": 123456,
"Fee": "2",
"ledger_index": 100,
@@ -492,7 +495,8 @@ TEST_F(RPCTxTest, ReturnBinary)
"date": 123456,
"ledger_index": 100,
"inLedger": 100,
"validated": true
"validated": true,
"ctid": "C000006400640000"
})";
TransactionAndMetadata tx;
@@ -578,6 +582,7 @@ TEST_F(RPCTxTest, MintNFT)
"SigningPubKey": "74657374",
"TransactionType": "NFTokenMint",
"hash": "C74463F49CFDCBEF3E9902672719918CDE5042DC7E7660BEBD1D1105C4B6DFF4",
"ctid": "C000006400000000",
"meta": {{
"AffectedNodes": [
{{
@@ -829,6 +834,7 @@ TEST_F(RPCTxTest, CTIDNotMatch)
ASSERT_FALSE(output);
auto const err = rpc::makeError(output.result.error());
// TODO: https://github.com/XRPLF/clio/issues/2002
EXPECT_EQ(err.at("error_code").as_uint64(), 4);
EXPECT_EQ(
err.at("error_message").as_string(),