Merge branch 'pratik/otel-phase6-statsd' into pratik/otel-phase7-native-metrics

This commit is contained in:
Pratik Mankawde
2026-06-26 14:50:05 +01:00
346 changed files with 6599 additions and 4989 deletions

View File

@@ -13,6 +13,7 @@ add_executable(
helpers/TestSink.cpp
helpers/TxTest.cpp
)
patch_nix_binary(xrpl_tests)
set_target_properties(
xrpl_tests
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"

View File

@@ -231,13 +231,13 @@ TxTest::getCloseTime() const
STAmount
TxTest::getBalance(AccountID const& account, IOU const& iou) const
{
auto const sle = openLedger_->read(keylet::line(account, iou.issue()));
auto const sle = openLedger_->read(keylet::trustLine(account, iou.issue()));
if (!sle)
return STAmount{iou.issue(), 0};
auto const rippleState = ledger_entries::RippleState{sle};
auto const trustLine = ledger_entries::RippleState{sle};
auto balance = rippleState.getBalance();
auto balance = trustLine.getBalance();
if (iou.issue().account == account)
{
throw std::logic_error("TxTest::getBalance: account is issuer");

View File

@@ -619,7 +619,7 @@ TEST(AccountSet, Ticket)
// Verify alice has 1 owner object (the ticket)
EXPECT_EQ(env.getAccountRoot(alice.id()).getOwnerCount(), 1u);
// Verify ticket exists
EXPECT_TRUE(env.getClosedLedger().exists(keylet::kTicket(alice.id(), ticketSeq)));
EXPECT_TRUE(env.getClosedLedger().exists(keylet::ticket(alice.id(), ticketSeq)));
// Try using a ticket that alice doesn't have
EXPECT_EQ(
@@ -629,7 +629,7 @@ TEST(AccountSet, Ticket)
env.close();
// Verify ticket still exists
EXPECT_TRUE(env.getClosedLedger().exists(keylet::kTicket(alice.id(), ticketSeq)));
EXPECT_TRUE(env.getClosedLedger().exists(keylet::ticket(alice.id(), ticketSeq)));
// Get alice's sequence before using the ticket
std::uint32_t const aliceSeq = env.getAccountRoot(alice.id()).getSequence();
@@ -642,7 +642,7 @@ TEST(AccountSet, Ticket)
// Verify ticket is consumed (no owner objects)
EXPECT_EQ(env.getAccountRoot(alice.id()).getOwnerCount(), 0u);
EXPECT_FALSE(env.getClosedLedger().exists(keylet::kTicket(alice.id(), ticketSeq)));
EXPECT_FALSE(env.getClosedLedger().exists(keylet::ticket(alice.id(), ticketSeq)));
// Verify alice's sequence did NOT advance (ticket use doesn't increment seq)
EXPECT_EQ(env.getAccountRoot(alice.id()).getSequence(), aliceSeq);