mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Merge remote-tracking branch 'upstream/ripple/wasmi-host-functions' into ripple/se/fees
This commit is contained in:
@@ -583,7 +583,7 @@ LEDGER_ENTRY(ltLOAN, 0x0089, Loan, loan, ({
|
||||
// The unrounded true total value of the loan.
|
||||
//
|
||||
// - TrueTotalPrincialOutstanding can be computed using the algorithm
|
||||
// in the ripple::detail::loanPrincipalFromPeriodicPayment function.
|
||||
// in the xrpl::detail::loanPrincipalFromPeriodicPayment function.
|
||||
//
|
||||
// - TrueTotalInterestOutstanding = TrueTotalLoanValue -
|
||||
// TrueTotalPrincipalOutstanding
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <xrpl/protocol/digest.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
namespace test {
|
||||
|
||||
static Bytes
|
||||
@@ -2960,7 +2960,7 @@ struct HostFuncImpl_test : public beast::unit_test::suite
|
||||
}
|
||||
};
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(HostFuncImpl, app, ripple);
|
||||
BEAST_DEFINE_TESTSUITE(HostFuncImpl, app, xrpl);
|
||||
|
||||
} // namespace test
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <xrpl/ledger/detail/ApplyViewBase.h>
|
||||
#include <xrpl/protocol/digest.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
namespace test {
|
||||
|
||||
@@ -1024,7 +1024,7 @@ struct PerfHostFunctions : public TestHostFunctions
|
||||
if (data.size() > maxWasmDataLength)
|
||||
return Unexpected(HostFunctionError::DATA_FIELD_TOO_LARGE);
|
||||
|
||||
ripple::detail::ApplyViewBase v(
|
||||
xrpl::detail::ApplyViewBase v(
|
||||
env_.app().openLedger().current().get(), tapNONE);
|
||||
|
||||
auto sle = v.peek(leKey);
|
||||
@@ -1326,4 +1326,4 @@ struct PerfHostFunctions : public TestHostFunctions
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <xrpld/app/wasm/HostFuncWrapper.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
namespace test {
|
||||
|
||||
bool
|
||||
@@ -740,7 +740,7 @@ struct Wasm_test : public beast::unit_test::suite
|
||||
}
|
||||
};
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(Wasm, app, ripple);
|
||||
BEAST_DEFINE_TESTSUITE(Wasm, app, xrpl);
|
||||
|
||||
} // namespace test
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <xrpl/protocol/TER.h>
|
||||
#include <xrpl/protocol/UintTypes.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
enum class HostFunctionError : int32_t {
|
||||
INTERNAL = -1,
|
||||
@@ -514,4 +514,4 @@ struct HostFunctions
|
||||
// LCOV_EXCL_STOP
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <xrpld/app/tx/detail/ApplyContext.h>
|
||||
#include <xrpld/app/wasm/HostFunc.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
class WasmHostFunctionsImpl : public HostFunctions
|
||||
{
|
||||
ApplyContext& ctx;
|
||||
@@ -271,4 +271,4 @@ public:
|
||||
floatLog(Slice const& x, int32_t mode) override;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <xrpld/app/wasm/WasmiVM.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
using getLedgerSqn_proto = int32_t();
|
||||
wasm_trap_t*
|
||||
@@ -531,4 +531,4 @@ using floatLog_proto =
|
||||
wasm_trap_t*
|
||||
floatLog_wrap(void* env, wasm_val_vec_t const* params, wasm_val_vec_t* results);
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
|
||||
namespace bft = boost::function_types;
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
using Bytes = std::vector<std::uint8_t>;
|
||||
using Hash = ripple::uint256;
|
||||
using Hash = xrpl::uint256;
|
||||
|
||||
struct wmem
|
||||
{
|
||||
@@ -247,4 +247,4 @@ wasmParams(Types&&... args)
|
||||
return v;
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <string_view>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
static std::string_view const W_ENV = "env";
|
||||
static std::string_view const W_HOST_LIB = "host_lib";
|
||||
@@ -87,4 +87,4 @@ preflightEscrowWasm(
|
||||
std::string_view funcName = ESCROW_FUNCTION_NAME,
|
||||
std::vector<WasmParam> const& params = {});
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <wasm.h>
|
||||
#include <wasmi.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
template <class T, void (*Create)(T*, size_t), void (*Destroy)(T*)>
|
||||
struct WasmVec
|
||||
@@ -345,4 +345,4 @@ private:
|
||||
Types&&... args);
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
// #define DEBUG_OUTPUT 1
|
||||
#endif
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
Expected<std::int32_t, HostFunctionError>
|
||||
WasmHostFunctionsImpl::getLedgerSqn()
|
||||
@@ -1302,4 +1302,4 @@ floatLogImpl(Slice const& x, int32_t mode)
|
||||
// LCOV_EXCL_STOP
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <xrpl/protocol/STNumber.h>
|
||||
#include <xrpl/protocol/digest.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
using SFieldCRef = std::reference_wrapper<SField const>;
|
||||
|
||||
@@ -2182,4 +2182,4 @@ testGetDataIncrement()
|
||||
} // namespace test
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
static void
|
||||
setCommonHostFunctions(HostFunctions* hfs, ImportVec& i)
|
||||
@@ -213,4 +213,4 @@ WasmEngine::getJournal() const
|
||||
}
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#endif
|
||||
// #define SHOW_CALL_TIME 1
|
||||
|
||||
namespace ripple {
|
||||
namespace xrpl {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -963,4 +963,4 @@ WasmiEngine::getJournal() const
|
||||
}
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
} // namespace ripple
|
||||
} // namespace xrpl
|
||||
|
||||
Reference in New Issue
Block a user