mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-18 04:30:21 +00:00
feat: Wasm Module Versioning
This commit is contained in:
@@ -830,6 +830,11 @@ readLEB128(Bytes const& wasmCode, size_t& offset)
|
||||
shift += 7;
|
||||
if (shift >= 32)
|
||||
{
|
||||
// Drain the rest of the bytes for this leb.
|
||||
while (offset < wasmCode.size() && (wasmCode[offset] & 0x80) != 0)
|
||||
{
|
||||
++offset;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ struct Wasm_test : public beast::unit_test::Suite
|
||||
auto imports = ImportVec{};
|
||||
WasmImpFunc<Add_proto>(imports, "func-add", reinterpret_cast<void*>(&add), &hfs);
|
||||
|
||||
auto _ = vm.run(kWasmModule, hfs, 10'000'000, "finish", wasmParams(1234), imports, journal);
|
||||
auto _ = vm.run(kWasmModule, hfs, 10'000'000, "finish", wasmParams(), imports, journal);
|
||||
|
||||
auto const logged = sink.messages().str();
|
||||
BEAST_EXPECT(logged.find("Module version: xrpl-escrow-stdlib 4.5.6") != std::string::npos);
|
||||
|
||||
Reference in New Issue
Block a user