mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add Escrow support:
Escrow replaces the existing SusPay implementation with improved code that also adds hashlock support to escrow payments, making RCL ILP enabled. The new functionality is under the `Escrow` amendment, which supersedes and replaces the `SusPay` amendment. This commit also deprecates the `CryptoConditions` amendment which is replaced by the `CryptoConditionSuite` amendment which, once enabled, will allow use of cryptoconditions others than hashlocks.
This commit is contained in:
@@ -47,7 +47,6 @@ feature (const char* name)
|
||||
|
||||
uint256 const featureMultiSign = feature("MultiSign");
|
||||
uint256 const featureTickets = feature("Tickets");
|
||||
uint256 const featureSusPay = feature("SusPay");
|
||||
uint256 const featureTrustSetAuth = feature("TrustSetAuth");
|
||||
uint256 const featureFeeEscalation = feature("FeeEscalation");
|
||||
uint256 const featureOwnerPaysFee = feature("OwnerPaysFee");
|
||||
@@ -58,5 +57,7 @@ uint256 const featureFlow = feature("Flow");
|
||||
uint256 const featureCryptoConditions = feature("CryptoConditions");
|
||||
uint256 const featureTickSize = feature("TickSize");
|
||||
uint256 const featureRIPD1368 = feature("RIPD1368");
|
||||
uint256 const featureEscrow = feature("Escrow");
|
||||
uint256 const featureCryptoConditionsSuite = feature("CryptoConditionsSuite");
|
||||
|
||||
} // ripple
|
||||
|
||||
@@ -313,14 +313,14 @@ Keylet page(Keylet const& root,
|
||||
}
|
||||
|
||||
Keylet
|
||||
susPay (AccountID const& source, std::uint32_t seq)
|
||||
escrow (AccountID const& source, std::uint32_t seq)
|
||||
{
|
||||
sha512_half_hasher h;
|
||||
using beast::hash_append;
|
||||
hash_append(h, spaceSusPay);
|
||||
hash_append(h, spaceEscrow);
|
||||
hash_append(h, source);
|
||||
hash_append(h, seq);
|
||||
return { ltSUSPAY, static_cast<uint256>(h) };
|
||||
return { ltESCROW, static_cast<uint256>(h) };
|
||||
}
|
||||
|
||||
Keylet
|
||||
|
||||
@@ -82,7 +82,7 @@ LedgerFormats::LedgerFormats ()
|
||||
<< SOElement (sfHighQualityOut, SOE_OPTIONAL)
|
||||
;
|
||||
|
||||
add ("SuspendedPayment", ltSUSPAY) <<
|
||||
add ("Escrow", ltESCROW) <<
|
||||
SOElement (sfAccount, SOE_REQUIRED) <<
|
||||
SOElement (sfDestination, SOE_REQUIRED) <<
|
||||
SOElement (sfAmount, SOE_REQUIRED) <<
|
||||
|
||||
@@ -67,7 +67,7 @@ TxFormats::TxFormats ()
|
||||
<< SOElement (sfDeliverMin, SOE_OPTIONAL)
|
||||
;
|
||||
|
||||
add ("SuspendedPaymentCreate", ttSUSPAY_CREATE) <<
|
||||
add ("EscrowCreate", ttESCROW_CREATE) <<
|
||||
SOElement (sfDestination, SOE_REQUIRED) <<
|
||||
SOElement (sfAmount, SOE_REQUIRED) <<
|
||||
SOElement (sfCondition, SOE_OPTIONAL) <<
|
||||
@@ -75,13 +75,13 @@ TxFormats::TxFormats ()
|
||||
SOElement (sfFinishAfter, SOE_OPTIONAL) <<
|
||||
SOElement (sfDestinationTag, SOE_OPTIONAL);
|
||||
|
||||
add ("SuspendedPaymentFinish", ttSUSPAY_FINISH) <<
|
||||
add ("EscrowFinish", ttESCROW_FINISH) <<
|
||||
SOElement (sfOwner, SOE_REQUIRED) <<
|
||||
SOElement (sfOfferSequence, SOE_REQUIRED) <<
|
||||
SOElement (sfFulfillment, SOE_OPTIONAL) <<
|
||||
SOElement (sfCondition, SOE_OPTIONAL);
|
||||
|
||||
add ("SuspendedPaymentCancel", ttSUSPAY_CANCEL) <<
|
||||
add ("EscrowCancel", ttESCROW_CANCEL) <<
|
||||
SOElement (sfOwner, SOE_REQUIRED) <<
|
||||
SOElement (sfOfferSequence, SOE_REQUIRED);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user