mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Rename allowClawback flag to allowTrustLineClawback (#4617)
Reason for this change is here XRPLF/XRPL-Standards#119 We would want to be explicit that this flag is exclusively for trustline. For new token types(eg. CFT), they will not utilize this flag for clawback, instead, they will turn clawback on/off on the token-level, which is more versatile.
This commit is contained in:
@@ -609,25 +609,29 @@ public:
|
||||
}
|
||||
|
||||
static constexpr std::pair<std::string_view, std::uint32_t>
|
||||
allowClawbackFlag{"allowClawback", asfAllowClawback};
|
||||
allowTrustLineClawbackFlag{
|
||||
"allowTrustLineClawback", asfAllowTrustLineClawback};
|
||||
|
||||
if (features[featureClawback])
|
||||
{
|
||||
// must use bob's account because alice has noFreeze set
|
||||
auto const f1 = getAccountFlag(allowClawbackFlag.first, bob);
|
||||
auto const f1 =
|
||||
getAccountFlag(allowTrustLineClawbackFlag.first, bob);
|
||||
BEAST_EXPECT(f1.has_value());
|
||||
BEAST_EXPECT(!f1.value());
|
||||
|
||||
// Set allowClawback
|
||||
env(fset(bob, allowClawbackFlag.second));
|
||||
// Set allowTrustLineClawback
|
||||
env(fset(bob, allowTrustLineClawbackFlag.second));
|
||||
env.close();
|
||||
auto const f2 = getAccountFlag(allowClawbackFlag.first, bob);
|
||||
auto const f2 =
|
||||
getAccountFlag(allowTrustLineClawbackFlag.first, bob);
|
||||
BEAST_EXPECT(f2.has_value());
|
||||
BEAST_EXPECT(f2.value());
|
||||
}
|
||||
else
|
||||
{
|
||||
BEAST_EXPECT(!getAccountFlag(allowClawbackFlag.first, bob));
|
||||
BEAST_EXPECT(
|
||||
!getAccountFlag(allowTrustLineClawbackFlag.first, bob));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,10 +93,10 @@ public:
|
||||
// and are tested elsewhere
|
||||
continue;
|
||||
}
|
||||
if (flag == asfAllowClawback)
|
||||
if (flag == asfAllowTrustLineClawback)
|
||||
{
|
||||
// The asfAllowClawback flag can't be cleared. It is tested
|
||||
// elsewhere.
|
||||
// The asfAllowTrustLineClawback flag can't be cleared. It
|
||||
// is tested elsewhere.
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user