Skip to content

Commit 1554b54

Browse files
committed
Static asserts for consistency of fee defaults.
This adds static asserts that ensure that the default values given for fee levels in the wallet (minimum fee and incremental feerate increase) are at least as high as the corresponding levels configured in the core node policy.
1 parent 80fd474 commit 1554b54

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/wallet/test/wallet_tests.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ extern UniValue importmulti(const JSONRPCRequest& request);
2828
extern UniValue dumpwallet(const JSONRPCRequest& request);
2929
extern UniValue importwallet(const JSONRPCRequest& request);
3030

31+
// Ensure that fee levels defined in the wallet are at least as high
32+
// as the default levels for node policy.
33+
static_assert(DEFAULT_TRANSACTION_MINFEE >= DEFAULT_MIN_RELAY_TX_FEE, "wallet minimum fee is smaller than default relay fee");
34+
static_assert(WALLET_INCREMENTAL_RELAY_FEE >= DEFAULT_INCREMENTAL_RELAY_FEE, "wallet incremental fee is smaller than default incremental relay fee");
35+
3136
BOOST_FIXTURE_TEST_SUITE(wallet_tests, WalletTestingSetup)
3237

3338
static std::shared_ptr<CWallet> TestLoadWallet(interfaces::Chain& chain)

0 commit comments

Comments
 (0)