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

@@ -67,7 +67,8 @@ Env::AppBundle::AppBundle(
app->logs().threshold(thresh);
if (!app->setup({}))
Throw<std::runtime_error>("Env::AppBundle: setup failed");
timeKeeper->set(app->getLedgerMaster().getClosedLedger()->info().closeTime);
timeKeeper->set(
app->getLedgerMaster().getClosedLedger()->header().closeTime);
app->start(false /*don't start timers*/);
thread = std::thread([&]() { app->run(); });
@@ -107,7 +108,7 @@ Env::close(
// Round up to next distinguishable value
using namespace std::chrono_literals;
bool res = true;
closeTime += closed()->info().closeTimeResolution - 1s;
closeTime += closed()->header().closeTimeResolution - 1s;
timeKeeper().set(closeTime);
// Go through the rpc interface unless we need to simulate
// a specific consensus delay.
@@ -130,7 +131,7 @@ Env::close(
res = false;
}
}
timeKeeper().set(closed()->info().closeTime);
timeKeeper().set(closed()->header().closeTime);
return res;
}