# include <ripple/app/ledger/BuildLedger.h>
# include <ripple/app/misc/CanonicalTXSet.h>
# include <ripple/consensus/LedgerTiming.h> // ledgerDefaultTimeResolution
// Start with what you have.
Application const& app = ...
beast::Journal journal = ...
std::shared_ptr<Ledger const> const& parent = ...
std::shared_ptr<STTx const> const& transaction = ...
// Massage them into parameters for buildLedger.
NetClock::time_point const closeTime = app.timeKeeper().closeTime();
bool const closeTimeCorrect = false;
NetClock::duration closeTimeResolution = ledgerDefaultTimeResolution;
CanonicalTXSet const transactions{parent->info().hash};
transactions.insert(transaction);
std::set<TXID> failedTransactions; // Leave empty.
std::shared_ptr<Ledger> child = buildLedger(
parent,
closeTime,
closeTimeCorrect ,
closeTimeResolution,
app,
transactions,
failedTransactions,
journal);