feat: Hook up parent_ldgr_time host function

This commit is contained in:
TimothyBanks
2026-08-10 14:55:57 -04:00
parent b5a90e76ee
commit 8da36db515
11 changed files with 95 additions and 1 deletions

View File

@@ -71,6 +71,18 @@ HostContext::getLedgerSqn(rust::Slice<std::uint8_t> out) const noexcept
});
}
std::int32_t
HostContext::getParentLedgerTime(rust::Slice<std::uint8_t> out) const noexcept
{
return guarded(hostFunctions_.getJournal(), kHostInternal, [&] {
auto const time = hostFunctions_.getParentLedgerTime();
if (!time)
return hfErrorToInt(time.error());
return answerScalar(out, *time);
});
}
std::int32_t
HostContext::getCurrentLedgerObjField(std::int32_t field, rust::Slice<std::uint8_t> out)
const noexcept