diff options
author | Daniel Kraft <d@domob.eu> | 2020-06-24 11:44:21 +0200 |
---|---|---|
committer | Daniel Kraft <d@domob.eu> | 2020-06-24 11:44:21 +0200 |
commit | 1554b54d47d7e24ce2491f57d24e56d38ceb7649 (patch) | |
tree | 0686aabf2363e59ffdb620e9c55807045dc24a70 /src/wallet | |
parent | 80fd474e402bb003c3a427f1997eb649e69138ba (diff) | |
download | bitcoin-1554b54d47d7e24ce2491f57d24e56d38ceb7649.tar.xz |
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.
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/test/wallet_tests.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index 497ccd14bb..75ad1167cc 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -28,6 +28,11 @@ extern UniValue importmulti(const JSONRPCRequest& request); extern UniValue dumpwallet(const JSONRPCRequest& request); extern UniValue importwallet(const JSONRPCRequest& request); +// Ensure that fee levels defined in the wallet are at least as high +// as the default levels for node policy. +static_assert(DEFAULT_TRANSACTION_MINFEE >= DEFAULT_MIN_RELAY_TX_FEE, "wallet minimum fee is smaller than default relay fee"); +static_assert(WALLET_INCREMENTAL_RELAY_FEE >= DEFAULT_INCREMENTAL_RELAY_FEE, "wallet incremental fee is smaller than default incremental relay fee"); + BOOST_FIXTURE_TEST_SUITE(wallet_tests, WalletTestingSetup) static std::shared_ptr<CWallet> TestLoadWallet(interfaces::Chain& chain) |