feat: Hook up parent_ldgr_hash host function

This commit is contained in:
TimothyBanks
2026-08-10 15:04:35 -04:00
parent 8da36db515
commit 6abd492ebb
11 changed files with 97 additions and 1 deletions

View File

@@ -83,6 +83,18 @@ HostContext::getParentLedgerTime(rust::Slice<std::uint8_t> out) const noexcept
});
}
std::int32_t
HostContext::getParentLedgerHash(rust::Slice<std::uint8_t> out) const noexcept
{
return guarded(hostFunctions_.getJournal(), kHostInternal, [&] {
auto const hash = hostFunctions_.getParentLedgerHash();
if (!hash)
return hfErrorToInt(hash.error());
return answer(out, hash->data(), hash->size());
});
}
std::int32_t
HostContext::getCurrentLedgerObjField(std::int32_t field, rust::Slice<std::uint8_t> out)
const noexcept