]> Git Repo - VerusCoin.git/blobdiff - qa/rpc-tests/finalsaplingroot.py
Merge pull request #97 from miketout/dev
[VerusCoin.git] / qa / rpc-tests / finalsaplingroot.py
index 83f16edec9773d86817f153a896e4e38ea778fbd..6d66cd83a14b89066a86231b06761fb57ecb303e 100755 (executable)
@@ -1,12 +1,15 @@
-#!/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,
@@ -54,7 +57,7 @@ class FinalSaplingRootTest(BitcoinTestFramework):
             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')})
@@ -94,7 +97,7 @@ class FinalSaplingRootTest(BitcoinTestFramework):
         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)
This page took 0.025032 seconds and 4 git commands to generate.