mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 23:38:08 +00:00
Merge upstream/ripple/smart-escrow into xrplf/smart-contracts
Upstream rewrote the wasm VM and host-function system (Rust `crates/` bridged via cxx), collapsed `transactions.macro` onto `TxSettings`, and moved invariant running from `ApplyContext` to `Transactor`. This merge resolves those conflicts and the breaks that carried no conflict marker. Conflict resolutions of note: - transactions.macro: took upstream's 5-argument `TxSettings` form and re-expressed our `emitable` column as `TxSettings::emittance`, a new scoped `Emittance` enum in TxSettings.h. `Emitable.cpp` and the transaction code generator read the new member. - sfields.macro: upstream claimed UINT32 75-80, so `sfParameterFlag` moves from 80 to 86. The amendment is not live, so no wire break. - HostFunc.h: took upstream's version, which drops `floatRoot`, and re-added the 15 contract virtuals. `setDataNestedObjectField`'s parameters are renamed to `(account, key, nestedKey, value)` to match the implementation; the wire order is unchanged. - WasmCommon.h: `SubmitTxnFailure` (-21) and `InvalidState` (-22) join upstream's enum and the Rust `host_errors!` table. `Success` is gone; the helpers that compared against it now return `expected<void, ...>`. - Transactor.cpp: kept the emitted-transaction pass, now using `checkInvariants(result, fee, InvariantScope::ProtocolOnly)`. Breaks with no conflict marker: - `Emitable.cpp` used the 8-argument TRANSACTION macro. - `STTx::getSeqValue` is gone; use `getSeqProxy().value()`. - `NetworkOPsImp::subLock_` is now `streamLock_`, held with `scoped_lock`. - The `LedgerEntryHelpers` namespace is now `ledger_entry_helpers`. - `keylet::vault` takes a `SeqProxy`. The three contract `ledger_entry` parsers were copy-pasted from the vault one and returned vault keylets; they now build contract, contract source and contract data keylets from their own fields. `contract_hash` is added to jss. The 15 contract host functions still register through the deleted C++ wrapper layer, so contract bytecode does not run yet. Porting them to the Rust-declared ABI is the next commit.
This commit is contained in:
@@ -444,8 +444,6 @@ public:
|
||||
|
||||
bool
|
||||
operator==(STObject const& o) const;
|
||||
bool
|
||||
operator!=(STObject const& o) const;
|
||||
|
||||
class FieldErr;
|
||||
|
||||
@@ -679,36 +677,6 @@ public:
|
||||
return !lhs.engaged() || *lhs == *rhs;
|
||||
}
|
||||
|
||||
friend bool
|
||||
operator!=(OptionalProxy const& lhs, std::nullopt_t) noexcept
|
||||
{
|
||||
return !(lhs == std::nullopt);
|
||||
}
|
||||
|
||||
friend bool
|
||||
operator!=(std::nullopt_t, OptionalProxy const& rhs) noexcept
|
||||
{
|
||||
return !(rhs == std::nullopt);
|
||||
}
|
||||
|
||||
friend bool
|
||||
operator!=(OptionalProxy const& lhs, optional_type const& rhs) noexcept
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
friend bool
|
||||
operator!=(optional_type const& lhs, OptionalProxy const& rhs) noexcept
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
friend bool
|
||||
operator!=(OptionalProxy const& lhs, OptionalProxy const& rhs) noexcept
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
// Emulate std::optional::value_or
|
||||
[[nodiscard]] value_type
|
||||
valueOr(value_type val) const;
|
||||
@@ -1214,12 +1182,6 @@ STObject::setFieldH160(SField const& field, BaseUInt<160, Tag> const& v)
|
||||
}
|
||||
}
|
||||
|
||||
inline bool
|
||||
STObject::operator!=(STObject const& o) const
|
||||
{
|
||||
return !(*this == o);
|
||||
}
|
||||
|
||||
template <typename T, typename V>
|
||||
V
|
||||
STObject::getFieldByValue(SField const& field) const
|
||||
|
||||
Reference in New Issue
Block a user