2 # Copyright (c) 2017 The Bitcoin Core developers
3 # Distributed under the MIT software license, see the accompanying
4 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 """Test deprecation of RPC calls."""
6 from test_framework
.test_framework
import BitcoinTestFramework
7 from test_framework
.util
import assert_raises_rpc_error
9 class DeprecatedRpcTest(BitcoinTestFramework
):
10 def set_test_params(self
):
12 self
.setup_clean_chain
= True
13 self
.extra_args
= [[], ["-deprecatedrpc=estimatefee"]]
16 self
.log
.info("estimatefee: Shows deprecated message")
17 assert_raises_rpc_error(-32, 'estimatefee is deprecated', self
.nodes
[0].estimatefee
, 1)
19 self
.log
.info("Using -deprecatedrpc=estimatefee bypasses the error")
20 self
.nodes
[1].estimatefee(1)
22 if __name__
== '__main__':
23 DeprecatedRpcTest().main()