Merge branch 'ripple/wamr-host-functions' into ripple/se/fees

This commit is contained in:
Mayukha Vadari
2025-10-24 16:02:16 -04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -1315,7 +1315,7 @@ struct HostFuncImpl_test : public beast::unit_test::suite
// Should succeed for small data
std::vector<uint8_t> data(10, 0x42);
auto const result = hfs.updateData(Slice(data.data(), data.size()));
BEAST_EXPECT(result.has_value() && result.value() == 0);
BEAST_EXPECT(result.has_value() && result.value() == data.size());
// Should fail for too large data
std::vector<uint8_t> bigData(maxWasmDataLength + 1, 0x42);

View File

@@ -431,7 +431,7 @@ WasmHostFunctionsImpl::updateData(Slice const& data)
return Unexpected(HostFunctionError::DATA_FIELD_TOO_LARGE);
}
data_ = Bytes(data.begin(), data.end());
return 0;
return data_.size();
}
Expected<int32_t, HostFunctionError>