mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-23 15:20:54 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ Oracle::set(UpdateArg const& arg)
|
||||
else
|
||||
jv[jss::LastUpdateTime] = to_string(
|
||||
duration_cast<seconds>(
|
||||
env_.current()->info().closeTime.time_since_epoch())
|
||||
env_.current()->header().closeTime.time_since_epoch())
|
||||
.count() +
|
||||
epoch_offset.count());
|
||||
Json::Value dataSeries(Json::arrayValue);
|
||||
|
||||
Reference in New Issue
Block a user