It is not possible to make sprout addresses via z_getnewaddress
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
# Copyright (c) 2018 The Zcash developers
|
# Copyright (c) 2018 The Zcash developers
|
||||||
|
# Copyright (c) 2019 The Hush developers
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
@@ -185,18 +186,5 @@ class WalletSaplingTest(BitcoinTestFramework):
|
|||||||
self.nodes[2].z_importkey(sk1, "yes")
|
self.nodes[2].z_importkey(sk1, "yes")
|
||||||
assert_equal(self.nodes[2].z_getbalance(saplingAddr1), Decimal('5'))
|
assert_equal(self.nodes[2].z_getbalance(saplingAddr1), Decimal('5'))
|
||||||
|
|
||||||
# Make sure we get a useful error when trying to send to both sprout and sapling
|
|
||||||
node4_sproutaddr = self.nodes[3].z_getnewaddress('sprout')
|
|
||||||
node4_saplingaddr = self.nodes[3].z_getnewaddress('sapling')
|
|
||||||
try:
|
|
||||||
self.nodes[1].z_sendmany(
|
|
||||||
taddr1,
|
|
||||||
[{'address': node4_sproutaddr, 'amount': 2.5}, {'address': node4_saplingaddr, 'amount': 2.4999}],
|
|
||||||
1, 0.0001
|
|
||||||
)
|
|
||||||
raise AssertionError("Should have thrown an exception")
|
|
||||||
except JSONRPCException as e:
|
|
||||||
assert_equal("Cannot send to both Sprout and Sapling addresses using z_sendmany", e.error['message'])
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
WalletSaplingTest().main()
|
WalletSaplingTest().main()
|
||||||
|
|||||||
Reference in New Issue
Block a user