Skip to content

Commit

Permalink
Reduce default reserves to 10/2 (XRPLF#4329)
Browse files Browse the repository at this point in the history
Reduce the reserve requirements from 20/5 to 10/2 in line with the current network votes. The requirements of 10/2 have been on the network long enough that new nodes should not still have the old reserve amount.

Co-authored-by: Richard Holland <[email protected]>
  • Loading branch information
2 people authored and dangell7 committed Mar 5, 2023
1 parent 961cd7e commit c47baec
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
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

0 comments on commit c47baec

Please sign in to comment.