mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-08 12:45:49 +00:00
Reduce default reserves to 10/2 (#4329)
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 <richard.holland@starstone.co.nz>
This commit is contained in:
@@ -46,10 +46,10 @@ public:
|
|||||||
static constexpr FeeUnit32 reference_fee_units{10};
|
static constexpr FeeUnit32 reference_fee_units{10};
|
||||||
|
|
||||||
/** The account reserve requirement in drops. */
|
/** 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. */
|
/** 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;
|
virtual ~FeeVote() = default;
|
||||||
|
|||||||
@@ -515,16 +515,16 @@ public:
|
|||||||
|
|
||||||
// All it takes is a large enough XRP payment to resurrect
|
// All it takes is a large enough XRP payment to resurrect
|
||||||
// becky's account. Try too small a payment.
|
// 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();
|
env.close();
|
||||||
|
|
||||||
// Actually resurrect becky's account.
|
// Actually resurrect becky's account.
|
||||||
env(pay(alice, becky, XRP(20)));
|
env(pay(alice, becky, XRP(10)));
|
||||||
env.close();
|
env.close();
|
||||||
|
|
||||||
// becky's account root should be back.
|
// becky's account root should be back.
|
||||||
BEAST_EXPECT(env.closed()->exists(beckyAcctKey));
|
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
|
// becky's resurrected account can be the destination of alice's
|
||||||
// PayChannel.
|
// PayChannel.
|
||||||
@@ -541,7 +541,7 @@ public:
|
|||||||
env(payChanClaim());
|
env(payChanClaim());
|
||||||
env.close();
|
env.close();
|
||||||
|
|
||||||
BEAST_EXPECT(env.balance(becky) == XRP(20) + payChanXRP);
|
BEAST_EXPECT(env.balance(becky) == XRP(10) + payChanXRP);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ class FeeVote_test : public beast::unit_test::suite
|
|||||||
Section config;
|
Section config;
|
||||||
auto setup = setup_FeeVote(config);
|
auto setup = setup_FeeVote(config);
|
||||||
BEAST_EXPECT(setup.reference_fee == 10);
|
BEAST_EXPECT(setup.reference_fee == 10);
|
||||||
BEAST_EXPECT(setup.account_reserve == 20 * DROPS_PER_XRP);
|
BEAST_EXPECT(setup.account_reserve == 10 * DROPS_PER_XRP);
|
||||||
BEAST_EXPECT(setup.owner_reserve == 5 * DROPS_PER_XRP);
|
BEAST_EXPECT(setup.owner_reserve == 2 * DROPS_PER_XRP);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
Section config;
|
Section config;
|
||||||
@@ -57,8 +57,8 @@ class FeeVote_test : public beast::unit_test::suite
|
|||||||
// Illegal values are ignored, and the defaults left unchanged
|
// Illegal values are ignored, and the defaults left unchanged
|
||||||
auto setup = setup_FeeVote(config);
|
auto setup = setup_FeeVote(config);
|
||||||
BEAST_EXPECT(setup.reference_fee == 10);
|
BEAST_EXPECT(setup.reference_fee == 10);
|
||||||
BEAST_EXPECT(setup.account_reserve == 20 * DROPS_PER_XRP);
|
BEAST_EXPECT(setup.account_reserve == 10 * DROPS_PER_XRP);
|
||||||
BEAST_EXPECT(setup.owner_reserve == 5 * DROPS_PER_XRP);
|
BEAST_EXPECT(setup.owner_reserve == 2 * DROPS_PER_XRP);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
Section config;
|
Section config;
|
||||||
@@ -87,8 +87,8 @@ class FeeVote_test : public beast::unit_test::suite
|
|||||||
// Illegal values are ignored, and the defaults left unchanged
|
// Illegal values are ignored, and the defaults left unchanged
|
||||||
auto setup = setup_FeeVote(config);
|
auto setup = setup_FeeVote(config);
|
||||||
BEAST_EXPECT(setup.reference_fee == 10);
|
BEAST_EXPECT(setup.reference_fee == 10);
|
||||||
BEAST_EXPECT(setup.account_reserve == 20 * DROPS_PER_XRP);
|
BEAST_EXPECT(setup.account_reserve == 10 * DROPS_PER_XRP);
|
||||||
BEAST_EXPECT(setup.owner_reserve == 5 * DROPS_PER_XRP);
|
BEAST_EXPECT(setup.owner_reserve == 2 * DROPS_PER_XRP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ class AccountTx_test : public beast::unit_test::suite
|
|||||||
|
|
||||||
// All it takes is a large enough XRP payment to resurrect
|
// All it takes is a large enough XRP payment to resurrect
|
||||||
// becky's account. Try too small a payment.
|
// 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();
|
env.close();
|
||||||
|
|
||||||
// Actually resurrect becky's account.
|
// Actually resurrect becky's account.
|
||||||
|
|||||||
Reference in New Issue
Block a user