Skip to content

Commit 0c69b23

Browse files
authored
Merge branch 'develop' into ximinez/fix-getledger
2 parents a2e9318 + fb74dc2 commit 0c69b23

21 files changed

+136
-227
lines changed

.github/scripts/rename/copyright.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ fi
7070
if ! grep -q 'Dev Null' src/test/app/tx/apply_test.cpp; then
7171
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/app/tx/apply_test.cpp)" > src/test/app/tx/apply_test.cpp
7272
fi
73-
if ! grep -q 'Dev Null' src/test/app/NetworkOPs_test.cpp; then
74-
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/app/NetworkOPs_test.cpp)" > src/test/app/NetworkOPs_test.cpp
75-
fi
7673
if ! grep -q 'Dev Null' src/test/rpc/ManifestRPC_test.cpp; then
7774
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/rpc/ManifestRPC_test.cpp)" > src/test/rpc/ManifestRPC_test.cpp
7875
fi

.github/workflows/reusable-build-test-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
--target "${CMAKE_TARGET}"
131131
132132
- name: Upload rippled artifact (Linux)
133-
if: ${{ runner.os == 'Linux' }}
133+
if: ${{ github.repository_owner == 'XRPLF' && runner.os == 'Linux' }}
134134
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
135135
env:
136136
BUILD_DIR: ${{ inputs.build_dir }}

include/xrpl/protocol/detail/features.macro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,10 @@ XRPL_FEATURE(AMM, Supported::yes, VoteBehavior::DefaultNo
6363
XRPL_FEATURE(Clawback, Supported::yes, VoteBehavior::DefaultNo)
6464
XRPL_FIX (UniversalNumber, Supported::yes, VoteBehavior::DefaultNo)
6565
XRPL_FEATURE(XRPFees, Supported::yes, VoteBehavior::DefaultNo)
66-
XRPL_FEATURE(DisallowIncoming, Supported::yes, VoteBehavior::DefaultNo)
6766
XRPL_FIX (RemoveNFTokenAutoTrustLine, Supported::yes, VoteBehavior::DefaultYes)
6867
XRPL_FEATURE(FlowSortStrands, Supported::yes, VoteBehavior::DefaultYes)
6968
XRPL_FEATURE(RequireFullyCanonicalSig, Supported::yes, VoteBehavior::DefaultYes)
7069
XRPL_FEATURE(DeletableAccounts, Supported::yes, VoteBehavior::DefaultYes)
71-
XRPL_FEATURE(Checks, Supported::yes, VoteBehavior::DefaultYes)
7270
XRPL_FEATURE(Flow, Supported::yes, VoteBehavior::DefaultYes)
7371

7472
// The following amendments are obsolete, but must remain supported
@@ -116,10 +114,12 @@ XRPL_RETIRE_FIX(STAmountCanonicalize)
116114
XRPL_RETIRE_FIX(TakerDryOfferRemoval)
117115
XRPL_RETIRE_FIX(TrustLinesToSelf)
118116

117+
XRPL_RETIRE_FEATURE(Checks)
119118
XRPL_RETIRE_FEATURE(CheckCashMakesTrustLine)
120119
XRPL_RETIRE_FEATURE(CryptoConditions)
121120
XRPL_RETIRE_FEATURE(DepositAuth)
122121
XRPL_RETIRE_FEATURE(DepositPreauth)
122+
XRPL_RETIRE_FEATURE(DisallowIncoming)
123123
XRPL_RETIRE_FEATURE(Escrow)
124124
XRPL_RETIRE_FEATURE(EnforceInvariants)
125125
XRPL_RETIRE_FEATURE(ExpandedSignerList)

include/xrpl/protocol/detail/transactions.macro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ TRANSACTION(ttPAYCHAN_CLAIM, 15, PaymentChannelClaim,
226226
#endif
227227
TRANSACTION(ttCHECK_CREATE, 16, CheckCreate,
228228
Delegation::delegatable,
229-
featureChecks,
229+
uint256{},
230230
noPriv,
231231
({
232232
{sfDestination, soeREQUIRED},
@@ -242,7 +242,7 @@ TRANSACTION(ttCHECK_CREATE, 16, CheckCreate,
242242
#endif
243243
TRANSACTION(ttCHECK_CASH, 17, CheckCash,
244244
Delegation::delegatable,
245-
featureChecks,
245+
uint256{},
246246
noPriv,
247247
({
248248
{sfCheckID, soeREQUIRED},
@@ -256,7 +256,7 @@ TRANSACTION(ttCHECK_CASH, 17, CheckCash,
256256
#endif
257257
TRANSACTION(ttCHECK_CANCEL, 18, CheckCancel,
258258
Delegation::delegatable,
259-
featureChecks,
259+
uint256{},
260260
noPriv,
261261
({
262262
{sfCheckID, soeREQUIRED},

src/test/app/Check_test.cpp

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ class dest_tag
6767

6868
class Check_test : public beast::unit_test::suite
6969
{
70-
FeatureBitset const disallowIncoming{featureDisallowIncoming};
71-
7270
static uint256
7371
getCheckIndex(AccountID const& account, std::uint32_t uSequence)
7472
{
@@ -125,25 +123,6 @@ class Check_test : public beast::unit_test::suite
125123

126124
using namespace test::jtx;
127125
Account const alice{"alice"};
128-
{
129-
// If the Checks amendment is not enabled, you should not be able
130-
// to create, cash, or cancel checks.
131-
Env env{*this, features - featureChecks};
132-
133-
env.fund(XRP(1000), alice);
134-
env.close();
135-
136-
uint256 const checkId{
137-
getCheckIndex(env.master, env.seq(env.master))};
138-
env(check::create(env.master, alice, XRP(100)), ter(temDISABLED));
139-
env.close();
140-
141-
env(check::cash(alice, checkId, XRP(100)), ter(temDISABLED));
142-
env.close();
143-
144-
env(check::cancel(alice, checkId), ter(temDISABLED));
145-
env.close();
146-
}
147126
{
148127
// If the Checks amendment is enabled all check-related
149128
// facilities should be available.
@@ -277,24 +256,12 @@ class Check_test : public beast::unit_test::suite
277256

278257
using namespace test::jtx;
279258

280-
// test flag doesn't set unless amendment enabled
281-
{
282-
Env env{*this, features - disallowIncoming};
283-
Account const alice{"alice"};
284-
env.fund(XRP(10000), alice);
285-
env(fset(alice, asfDisallowIncomingCheck));
286-
env.close();
287-
auto const sle = env.le(alice);
288-
uint32_t flags = sle->getFlags();
289-
BEAST_EXPECT(!(flags & lsfDisallowIncomingCheck));
290-
}
291-
292259
Account const gw{"gateway"};
293260
Account const alice{"alice"};
294261
Account const bob{"bob"};
295262
IOU const USD{gw["USD"]};
296263

297-
Env env{*this, features | disallowIncoming};
264+
Env env{*this, features};
298265

299266
STAmount const startBalance{XRP(1000).value()};
300267
env.fund(startBalance, gw, alice, bob);
@@ -2613,7 +2580,6 @@ class Check_test : public beast::unit_test::suite
26132580
{
26142581
using namespace test::jtx;
26152582
auto const sa = testable_amendments();
2616-
testWithFeats(sa - disallowIncoming);
26172583
testWithFeats(sa);
26182584
testTrustLineCreation(sa);
26192585
}

src/test/app/Delegate_test.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,9 +1703,6 @@ class Delegate_test : public beast::unit_test::suite
17031703
// NFTokenMint, NFTokenBurn, NFTokenCreateOffer, NFTokenCancelOffer,
17041704
// NFTokenAcceptOffer are not included, they are tested separately.
17051705
std::unordered_map<std::string, uint256> txRequiredFeatures{
1706-
{"CheckCreate", featureChecks},
1707-
{"CheckCash", featureChecks},
1708-
{"CheckCancel", featureChecks},
17091706
{"Clawback", featureClawback},
17101707
{"AMMClawback", featureAMMClawback},
17111708
{"AMMCreate", featureAMM},

src/test/app/NFToken_test.cpp

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ namespace ripple {
1212

1313
class NFTokenBaseUtil_test : public beast::unit_test::suite
1414
{
15-
FeatureBitset const disallowIncoming{featureDisallowIncoming};
16-
1715
// Helper function that returns the number of NFTs minted by an issuer.
1816
static std::uint32_t
1917
mintedCount(test::jtx::Env const& env, test::jtx::Account const& issuer)
@@ -2960,19 +2958,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
29602958

29612959
using namespace test::jtx;
29622960

2963-
// test flag doesn't set unless amendment enabled
2964-
{
2965-
Env env{*this, features - disallowIncoming};
2966-
Account const alice{"alice"};
2967-
env.fund(XRP(10000), alice);
2968-
env(fset(alice, asfDisallowIncomingNFTokenOffer));
2969-
env.close();
2970-
auto const sle = env.le(alice);
2971-
uint32_t flags = sle->getFlags();
2972-
BEAST_EXPECT(!(flags & lsfDisallowIncomingNFTokenOffer));
2973-
}
2974-
2975-
Env env{*this, features | disallowIncoming};
2961+
Env env{*this, features};
29762962

29772963
Account const issuer{"issuer"};
29782964
Account const minter{"minter"};
@@ -7624,8 +7610,8 @@ class NFTokenDisallowIncoming_test : public NFTokenBaseUtil_test
76247610
run() override
76257611
{
76267612
testWithFeats(
7627-
allFeatures - featureDisallowIncoming - fixNFTokenReserve -
7628-
featureNFTokenMintOffer - featureDynamicNFT);
7613+
allFeatures - fixNFTokenReserve - featureNFTokenMintOffer -
7614+
featureDynamicNFT);
76297615
}
76307616
};
76317617

src/test/app/NetworkOPs_test.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Copyright (c) 2020 Dev Null Productions
2-
31
#include <test/jtx.h>
42
#include <test/jtx/CaptureLogs.h>
53
#include <test/jtx/Env.h>

src/test/app/PayChan_test.cpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ using namespace jtx::paychan;
1414

1515
struct PayChan_test : public beast::unit_test::suite
1616
{
17-
FeatureBitset const disallowIncoming{featureDisallowIncoming};
18-
1917
static std::pair<uint256, std::shared_ptr<SLE const>>
2018
channelKeyAndSle(
2119
ReadView const& view,
@@ -242,20 +240,8 @@ struct PayChan_test : public beast::unit_test::suite
242240
testcase("Disallow Incoming Flag");
243241
using namespace jtx;
244242

245-
// test flag doesn't set unless amendment enabled
246-
{
247-
Env env{*this, features - disallowIncoming};
248-
Account const alice{"alice"};
249-
env.fund(XRP(10000), alice);
250-
env(fset(alice, asfDisallowIncomingPayChan));
251-
env.close();
252-
auto const sle = env.le(alice);
253-
uint32_t flags = sle->getFlags();
254-
BEAST_EXPECT(!(flags & lsfDisallowIncomingPayChan));
255-
}
256-
257243
using namespace std::literals::chrono_literals;
258-
Env env{*this, features | disallowIncoming};
244+
Env env{*this, features};
259245
auto const alice = Account("alice");
260246
auto const bob = Account("bob");
261247
auto const cho = Account("cho");
@@ -2127,7 +2113,6 @@ struct PayChan_test : public beast::unit_test::suite
21272113
{
21282114
using namespace test::jtx;
21292115
FeatureBitset const all{testable_amendments()};
2130-
testWithFeats(all - disallowIncoming);
21312116
testWithFeats(all);
21322117
testDepositAuthCreds();
21332118
testMetaAndOwnership(all - fixIncludeKeyletFields);

src/test/app/SetTrust_test.cpp

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ namespace test {
99

1010
class SetTrust_test : public beast::unit_test::suite
1111
{
12-
FeatureBitset const disallowIncoming{featureDisallowIncoming};
13-
1412
public:
1513
void
1614
testTrustLineDelete()
@@ -478,25 +476,12 @@ class SetTrust_test : public beast::unit_test::suite
478476

479477
using namespace test::jtx;
480478

481-
// test flag doesn't set unless amendment enabled
482-
{
483-
Env env{*this, features - disallowIncoming};
484-
Account const alice{"alice"};
485-
env.fund(XRP(10000), alice);
486-
env(fset(alice, asfDisallowIncomingTrustline));
487-
env.close();
488-
auto const sle = env.le(alice);
489-
uint32_t flags = sle->getFlags();
490-
BEAST_EXPECT(!(flags & lsfDisallowIncomingTrustline));
491-
}
492-
493479
// fixDisallowIncomingV1
494480
{
495481
for (bool const withFix : {true, false})
496482
{
497-
auto const amend = withFix
498-
? features | disallowIncoming
499-
: (features | disallowIncoming) - fixDisallowIncomingV1;
483+
auto const amend =
484+
withFix ? features : features - fixDisallowIncomingV1;
500485

501486
Env env{*this, amend};
502487
auto const dist = Account("dist");
@@ -532,7 +517,7 @@ class SetTrust_test : public beast::unit_test::suite
532517
}
533518
}
534519

535-
Env env{*this, features | disallowIncoming};
520+
Env env{*this, features};
536521

537522
auto const gw = Account{"gateway"};
538523
auto const alice = Account{"alice"};
@@ -630,7 +615,6 @@ class SetTrust_test : public beast::unit_test::suite
630615
{
631616
using namespace test::jtx;
632617
auto const sa = testable_amendments();
633-
testWithFeats(sa - disallowIncoming);
634618
testWithFeats(sa);
635619
}
636620
};

0 commit comments

Comments
 (0)