Track escrow in recipient's owner directory (RIPD-1523):

Introduce "fix1523" which corrects a minor technical flaw with
the original implementation of the escrow feature.

When creating an escrow, the entry would only be tracked in the
owner directory of the sender; as a result, an escrow recipient
would not be able to detect incoming escrows without monitoring
the ledger in real-time for transactions of interest or without
the sender communicating this information out of band.

With the fix in place, escrows where the recipient differs from
the sender will be listed in the recipient's owner directory as
well.
This commit is contained in:
Nik Bougalis
2017-08-25 02:15:19 -07:00
parent 39f9135104
commit c7c1b3cc3b
10 changed files with 251 additions and 78 deletions

View File

@@ -49,27 +49,30 @@ namespace detail {
class FeatureCollections
{
static constexpr char const* const featureNames[] =
{"MultiSign",
"Tickets",
"TrustSetAuth",
"FeeEscalation",
"OwnerPaysFee",
"CompareFlowV1V2",
"SHAMapV2",
"PayChan",
"Flow",
"CompareTakerFlowCross",
"FlowCross",
"CryptoConditions",
"TickSize",
"fix1368",
"Escrow",
"CryptoConditionsSuite",
"fix1373",
"EnforceInvariants",
"SortedDirectories",
"fix1201",
"fix1512"};
{
"MultiSign",
"Tickets",
"TrustSetAuth",
"FeeEscalation",
"OwnerPaysFee",
"CompareFlowV1V2",
"SHAMapV2",
"PayChan",
"Flow",
"CompareTakerFlowCross",
"FlowCross",
"CryptoConditions",
"TickSize",
"fix1368",
"Escrow",
"CryptoConditionsSuite",
"fix1373",
"EnforceInvariants",
"SortedDirectories",
"fix1201",
"fix1512",
"fix1523"
};
std::vector<uint256> features;
boost::container::flat_map<uint256, std::size_t> featureToIndex;
@@ -164,6 +167,7 @@ extern uint256 const featureEnforceInvariants;
extern uint256 const featureSortedDirectories;
extern uint256 const fix1201;
extern uint256 const fix1512;
extern uint256 const fix1523;
} // ripple