aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAntoine Poinsot <darosior@protonmail.com>2020-09-06 19:37:13 +0200
committerAntoine Poinsot <darosior@protonmail.com>2020-12-03 12:56:37 +0100
commite8ea6ad9c16997bdc7e22a20eca16e234290b7ff (patch)
tree1f67020b213cec9f7888475d878d7dff9a457425 /test
parent86ff2cf202bfb9d9b50800b8ffe3fead3f77f5fa (diff)
downloadbitcoin-e8ea6ad9c16997bdc7e22a20eca16e234290b7ff.tar.xz
init: don't create a CBlockPolicyEstimator if we don't relay transactions
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/feature_fee_estimation.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/feature_fee_estimation.py b/test/functional/feature_fee_estimation.py
index 8a8a0c7614..8f522aee66 100755
--- a/test/functional/feature_fee_estimation.py
+++ b/test/functional/feature_fee_estimation.py
@@ -13,6 +13,7 @@ from test_framework.util import (
assert_equal,
assert_greater_than,
assert_greater_than_or_equal,
+ assert_raises_rpc_error,
satoshi_round,
)
@@ -262,6 +263,11 @@ class EstimateFeeTest(BitcoinTestFramework):
self.log.info("Final estimates after emptying mempools")
check_estimates(self.nodes[1], self.fees_per_kb)
+ self.log.info("Testing that fee estimation is disabled in blocksonly.")
+ self.restart_node(0, ["-blocksonly"])
+ assert_raises_rpc_error(-32603, "Fee estimation disabled",
+ self.nodes[0].estimatesmartfee, 2)
+
if __name__ == '__main__':
EstimateFeeTest().main()