Remove zcrawreceive, zcrawjoinsplit, zcrawkeygen from default-allowed deprecated methods.
This commit is contained in:
parent
d6d3be9bf2
commit
4ea9de5ff6
|
@ -41,6 +41,13 @@ Option handling
|
||||||
is returned in addition to `pool` or `address_type` (which contain the
|
is returned in addition to `pool` or `address_type` (which contain the
|
||||||
same information) in the results of RPC methods that return address metadata.
|
same information) in the results of RPC methods that return address metadata.
|
||||||
|
|
||||||
|
RPC Changes
|
||||||
|
-----------
|
||||||
|
|
||||||
|
- The deprecated `zcrawkeygen`, `zcrawreceive`, and `zcrawjoinsplit` RPC
|
||||||
|
methods are now disabled by default. Start with `-allowdeprecated=all`
|
||||||
|
or select individual features if you wish to continue using these APIs.
|
||||||
|
|
||||||
Build system
|
Build system
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,13 @@ class WalletDeprecationTest(BitcoinTestFramework):
|
||||||
# z_getnewaddress is deprecated, but enabled by default so it should succeed
|
# z_getnewaddress is deprecated, but enabled by default so it should succeed
|
||||||
self.nodes[0].z_getnewaddress()
|
self.nodes[0].z_getnewaddress()
|
||||||
|
|
||||||
# zcrawkeygen is enabled by default so should succeed.
|
# zcrawkeygen is deprecated, and not enabled by default so it should fail
|
||||||
self.nodes[0].zcrawkeygen()
|
errorString = ''
|
||||||
|
try:
|
||||||
|
self.nodes[0].zcrawkeygen()
|
||||||
|
except JSONRPCException as e:
|
||||||
|
errorString = e.error['message']
|
||||||
|
assert "DEPRECATED" in errorString
|
||||||
|
|
||||||
# restart with a specific selection of deprecated methods enabled
|
# restart with a specific selection of deprecated methods enabled
|
||||||
stop_nodes(self.nodes)
|
stop_nodes(self.nodes)
|
||||||
|
|
|
@ -17,7 +17,7 @@ class JoinSplitTest(BitcoinTestFramework):
|
||||||
def setup_network(self):
|
def setup_network(self):
|
||||||
self.nodes = []
|
self.nodes = []
|
||||||
self.is_network_split = False
|
self.is_network_split = False
|
||||||
self.nodes.append(start_node(0, self.options.tmpdir))
|
self.nodes.append(start_node(0, self.options.tmpdir, ["-allowdeprecated=all"]))
|
||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
zckeypair = self.nodes[0].zcrawkeygen()
|
zckeypair = self.nodes[0].zcrawkeygen()
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.authproxy import JSONRPCException
|
from test_framework.authproxy import JSONRPCException
|
||||||
from test_framework.util import assert_equal, connect_nodes, \
|
from test_framework.util import assert_equal, connect_nodes, \
|
||||||
gather_inputs, sync_blocks
|
gather_inputs, start_nodes, sync_blocks
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
@ -16,6 +16,10 @@ class JoinSplitTest(BitcoinTestFramework):
|
||||||
# Start with split network:
|
# Start with split network:
|
||||||
return super(JoinSplitTest, self).setup_network(True)
|
return super(JoinSplitTest, self).setup_network(True)
|
||||||
|
|
||||||
|
def setup_nodes(self):
|
||||||
|
return start_nodes(self.num_nodes, self.options.tmpdir,
|
||||||
|
extra_args = [["-allowdeprecated=all"]] * self.num_nodes)
|
||||||
|
|
||||||
def txid_in_mempool(self, node, txid):
|
def txid_in_mempool(self, node, txid):
|
||||||
exception_triggered = False
|
exception_triggered = False
|
||||||
|
|
||||||
|
|
|
@ -26,14 +26,14 @@ static const std::set<std::string> DEFAULT_ALLOW_DEPRECATED{{
|
||||||
"legacy_privacy",
|
"legacy_privacy",
|
||||||
"getnewaddress",
|
"getnewaddress",
|
||||||
"z_getnewaddress",
|
"z_getnewaddress",
|
||||||
"zcrawreceive",
|
|
||||||
"zcrawjoinsplit",
|
|
||||||
"zcrawkeygen",
|
|
||||||
"addrtype"
|
"addrtype"
|
||||||
#endif
|
#endif
|
||||||
}};
|
}};
|
||||||
static const std::set<std::string> DEFAULT_DENY_DEPRECATED{{
|
static const std::set<std::string> DEFAULT_DENY_DEPRECATED{{
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
|
"zcrawreceive",
|
||||||
|
"zcrawjoinsplit",
|
||||||
|
"zcrawkeygen",
|
||||||
#endif
|
#endif
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue