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

@@ -48,9 +48,9 @@ public:
}
LedgerHeader const&
info() const override
header() const override
{
return base_.info();
return base_.header();
}
Fees const&

View File

@@ -82,7 +82,7 @@ private:
monotonic_resource_;
txs_map txs_;
Rules rules_;
LedgerHeader info_;
LedgerHeader header_;
ReadView const* base_;
detail::RawStateTable items_;
std::shared_ptr<void const> hold_;
@@ -189,7 +189,7 @@ public:
// ReadView
LedgerHeader const&
info() const override;
header() const override;
Fees const&
fees() const override;

View File

@@ -81,7 +81,7 @@ public:
/** Returns information about the ledger. */
virtual LedgerHeader const&
info() const = 0;
header() const = 0;
/** Returns true if this reflects an open ledger. */
virtual bool
@@ -91,14 +91,14 @@ public:
NetClock::time_point
parentCloseTime() const
{
return info().parentCloseTime;
return header().parentCloseTime;
}
/** Returns the sequence number of the base ledger. */
LedgerIndex
seq() const
{
return info().seq;
return header().seq;
}
/** Returns the fees for the base ledger. */

View File

@@ -28,7 +28,7 @@ public:
open() const override;
LedgerHeader const&
info() const override;
header() const override;
Fees const&
fees() const override;