-#!/usr/bin/env python2
+#!/usr/bin/env python
# Copyright (c) 2018 The Zcash developers
# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+# file COPYING or https://www.opensource.org/licenses/mit-license.php .
+
+import sys; assert sys.version_info < (3,), ur"This script does not run under Python 3. Please use Python 2.7.x."
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
connect_nodes_bi,
+ get_coinbase_address,
initialize_chain_clean,
start_nodes,
wait_and_assert_operationid_status,
assert_equal(blk["finalsaplingroot"], SAPLING_TREE_EMPTY_ROOT)
# Node 0 shields some funds
- taddr0 = self.nodes[0].getnewaddress()
+ taddr0 = get_coinbase_address(self.nodes[0])
saplingAddr0 = self.nodes[0].z_getnewaddress('sapling')
recipients = []
recipients.append({"address": saplingAddr0, "amount": Decimal('20')})
assert_equal(root, self.nodes[0].getblock("203")["finalsaplingroot"])
# Mine a block with a Sprout shielded tx and verify the final Sapling root does not change
- zaddr1 = self.nodes[1].z_getnewaddress()
+ zaddr1 = self.nodes[1].z_getnewaddress('sprout')
recipients = []
recipients.append({"address": zaddr1, "amount": Decimal('10')})
myopid = self.nodes[0].z_sendmany(taddr0, recipients, 1, 0)