refactor: rename info() to header() (#6138)

This change renames all the `info()` functions to `header()`, since they return `LedgerHeader` structs. It also renames the underlying variables from `info_` to `header_`.
This commit is contained in:
Mayukha Vadari
2025-12-10 16:04:37 -05:00
committed by GitHub
parent bff5954acf
commit 62efecbfb1
90 changed files with 609 additions and 582 deletions

View File

@@ -50,7 +50,7 @@ class Transaction_test : public beast::unit_test::suite
std::vector<std::shared_ptr<STTx const>> txns;
std::vector<std::shared_ptr<STObject const>> metas;
auto const startLegSeq = env.current()->info().seq;
auto const startLegSeq = env.current()->header().seq;
for (int i = 0; i < 750; ++i)
{
env(noop(alice));
@@ -59,7 +59,7 @@ class Transaction_test : public beast::unit_test::suite
metas.emplace_back(
env.closed()->txRead(env.tx()->getTransactionID()).second);
}
auto const endLegSeq = env.closed()->info().seq;
auto const endLegSeq = env.closed()->header().seq;
// Find the existing transactions
for (size_t i = 0; i < txns.size(); ++i)
@@ -302,7 +302,7 @@ class Transaction_test : public beast::unit_test::suite
std::vector<std::shared_ptr<STTx const>> txns;
std::vector<std::shared_ptr<STObject const>> metas;
auto const startLegSeq = env.current()->info().seq;
auto const startLegSeq = env.current()->header().seq;
for (int i = 0; i < 750; ++i)
{
env(noop(alice));
@@ -311,7 +311,7 @@ class Transaction_test : public beast::unit_test::suite
metas.emplace_back(
env.closed()->txRead(env.tx()->getTransactionID()).second);
}
auto const endLegSeq = env.closed()->info().seq;
auto const endLegSeq = env.closed()->header().seq;
// Find the existing transactions
for (size_t i = 0; i < txns.size(); ++i)
@@ -630,7 +630,7 @@ class Transaction_test : public beast::unit_test::suite
auto const alice = Account("alice");
auto const bob = Account("bob");
auto const startLegSeq = env.current()->info().seq;
auto const startLegSeq = env.current()->header().seq;
env.fund(XRP(10000), alice, bob);
env(pay(alice, bob, XRP(10)));
env.close();
@@ -661,7 +661,7 @@ class Transaction_test : public beast::unit_test::suite
Account const alice = Account("alice");
Account const bob = Account("bob");
std::uint32_t const startLegSeq = env.current()->info().seq;
std::uint32_t const startLegSeq = env.current()->header().seq;
env.fund(XRP(10000), alice, bob);
env(pay(alice, bob, XRP(10)));
env.close();
@@ -709,7 +709,7 @@ class Transaction_test : public beast::unit_test::suite
env(pay(alice, bob, XRP(10)));
env.close();
auto const ledgerSeq = env.current()->info().seq;
auto const ledgerSeq = env.current()->header().seq;
env(noop(alice), ter(tesSUCCESS));
env.close();
@@ -738,7 +738,7 @@ class Transaction_test : public beast::unit_test::suite
auto const alice = Account("alice");
auto const bob = Account("bob");
auto const startLegSeq = env.current()->info().seq;
auto const startLegSeq = env.current()->header().seq;
env.fund(XRP(10000), alice, bob);
env(pay(alice, bob, XRP(10)));
env.close();