feat: Hook up set_data host function

This commit is contained in:
TimothyBanks
2026-08-10 21:58:24 -04:00
parent 98abdef208
commit 98cf3a0532
11 changed files with 100 additions and 1 deletions

View File

@@ -862,4 +862,16 @@ HostContext::traceNum(rust::Str msg, std::int64_t number) const noexcept
});
}
std::int32_t
HostContext::updateData(rust::Slice<std::uint8_t const> data) const noexcept
{
return guarded(hostFunctions_.getJournal(), kHostInternal, [&] {
auto const stored = hostFunctions_.updateData(Slice{data.data(), data.size()});
if (!stored)
return hfErrorToInt(stored.error());
return *stored;
});
}
} // namespace xrpl