mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-18 18:15:50 +00:00
Merge branch 'ripple/wamr-host-functions' into ripple/se/fees
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user