Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce reserves to 10/2 #4329

Merged
merged 3 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ripple/app/misc/FeeVote.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ class FeeVote
static constexpr FeeUnit32 reference_fee_units{10};

/** The account reserve requirement in drops. */
XRPAmount account_reserve{20 * DROPS_PER_XRP};
XRPAmount account_reserve{10 * DROPS_PER_XRP};

/** The per-owned item reserve requirement in drops. */
XRPAmount owner_reserve{5 * DROPS_PER_XRP};
XRPAmount owner_reserve{2 * DROPS_PER_XRP};
};

virtual ~FeeVote() = default;
Expand Down
8 changes: 4 additions & 4 deletions src/test/app/AccountDelete_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,16 +515,16 @@ class AccountDelete_test : public beast::unit_test::suite

// All it takes is a large enough XRP payment to resurrect
// becky's account. Try too small a payment.
env(pay(alice, becky, XRP(19)), ter(tecNO_DST_INSUF_XRP));
env(pay(alice, becky, XRP(9)), ter(tecNO_DST_INSUF_XRP));
env.close();

// Actually resurrect becky's account.
env(pay(alice, becky, XRP(20)));
env(pay(alice, becky, XRP(10)));
env.close();

// becky's account root should be back.
BEAST_EXPECT(env.closed()->exists(beckyAcctKey));
BEAST_EXPECT(env.balance(becky) == XRP(20));
BEAST_EXPECT(env.balance(becky) == XRP(10));

// becky's resurrected account can be the destination of alice's
// PayChannel.
Expand All @@ -541,7 +541,7 @@ class AccountDelete_test : public beast::unit_test::suite
env(payChanClaim());
env.close();

BEAST_EXPECT(env.balance(becky) == XRP(20) + payChanXRP);
BEAST_EXPECT(env.balance(becky) == XRP(10) + payChanXRP);
}

void
Expand Down
12 changes: 6 additions & 6 deletions src/test/app/FeeVote_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class FeeVote_test : public beast::unit_test::suite
Section config;
auto setup = setup_FeeVote(config);
BEAST_EXPECT(setup.reference_fee == 10);
BEAST_EXPECT(setup.account_reserve == 20 * DROPS_PER_XRP);
BEAST_EXPECT(setup.owner_reserve == 5 * DROPS_PER_XRP);
BEAST_EXPECT(setup.account_reserve == 10 * DROPS_PER_XRP);
BEAST_EXPECT(setup.owner_reserve == 2 * DROPS_PER_XRP);
}
{
Section config;
Expand All @@ -57,8 +57,8 @@ class FeeVote_test : public beast::unit_test::suite
// Illegal values are ignored, and the defaults left unchanged
auto setup = setup_FeeVote(config);
BEAST_EXPECT(setup.reference_fee == 10);
BEAST_EXPECT(setup.account_reserve == 20 * DROPS_PER_XRP);
BEAST_EXPECT(setup.owner_reserve == 5 * DROPS_PER_XRP);
BEAST_EXPECT(setup.account_reserve == 10 * DROPS_PER_XRP);
BEAST_EXPECT(setup.owner_reserve == 2 * DROPS_PER_XRP);
}
{
Section config;
Expand Down Expand Up @@ -87,8 +87,8 @@ class FeeVote_test : public beast::unit_test::suite
// Illegal values are ignored, and the defaults left unchanged
auto setup = setup_FeeVote(config);
BEAST_EXPECT(setup.reference_fee == 10);
BEAST_EXPECT(setup.account_reserve == 20 * DROPS_PER_XRP);
BEAST_EXPECT(setup.owner_reserve == 5 * DROPS_PER_XRP);
BEAST_EXPECT(setup.account_reserve == 10 * DROPS_PER_XRP);
BEAST_EXPECT(setup.owner_reserve == 2 * DROPS_PER_XRP);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/rpc/AccountTx_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ class AccountTx_test : public beast::unit_test::suite

// All it takes is a large enough XRP payment to resurrect
// becky's account. Try too small a payment.
env(pay(alice, becky, XRP(19)), ter(tecNO_DST_INSUF_XRP));
env(pay(alice, becky, XRP(9)), ter(tecNO_DST_INSUF_XRP));
env.close();

// Actually resurrect becky's account.
Expand Down