mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
8cac4ed930
07cae5287c [wallet] remove unused GetScriptForMining (Sjors Provoost) 8bb3e4c487 [rpc] remove deprecated generate method (Sjors Provoost) Pull request description: As announced in v0.18, the wallet generate rpc method is deprecated and will be fully removed in v0.19. Clients should transition to using the node rpc method `generatetoaddress`. Tree-SHA512: 9e5e913b59f3e18440b2b7b356124c7b87ad19f81a1ab6ada06a6c396b84e734895465f569296f1ba8c12abf74863bab5fd77765c9e806c239713aa83a59485f
30 lines
1.1 KiB
Python
Executable File
30 lines
1.1 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
# Copyright (c) 2017 The Bitcoin Core developers
|
|
# Distributed under the MIT software license, see the accompanying
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
"""Test deprecation of RPC calls."""
|
|
from test_framework.test_framework import BitcoinTestFramework
|
|
# from test_framework.util import assert_raises_rpc_error
|
|
|
|
class DeprecatedRpcTest(BitcoinTestFramework):
|
|
def set_test_params(self):
|
|
self.num_nodes = 2
|
|
self.setup_clean_chain = True
|
|
self.extra_args = [[], []]
|
|
|
|
def run_test(self):
|
|
# This test should be used to verify correct behaviour of deprecated
|
|
# RPC methods with and without the -deprecatedrpc flags. For example:
|
|
#
|
|
# In set_test_params:
|
|
# self.extra_args = [[], ["-deprecatedrpc=generate"]]
|
|
#
|
|
# In run_test:
|
|
# self.log.info("Test generate RPC")
|
|
# assert_raises_rpc_error(-32, 'The wallet generate rpc method is deprecated', self.nodes[0].rpc.generate, 1)
|
|
# self.nodes[1].generate(1)
|
|
self.log.info("No tested deprecated RPC methods")
|
|
|
|
if __name__ == '__main__':
|
|
DeprecatedRpcTest().main()
|