diff options
author | John Newbery <john@johnnewbery.com> | 2018-11-30 17:49:03 -0500 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2018-12-06 12:18:52 -0500 |
commit | e5a8ea8f146393e2a5e7d73a49335f3670bada11 (patch) | |
tree | 30c7696918d0fed7d2edbc77ef0585674c170d32 | |
parent | cb41ade6b1d9e9b0abea42f7a6946c13ebfb2083 (diff) | |
download | bitcoin-e5a8ea8f146393e2a5e7d73a49335f3670bada11.tar.xz |
[tests] tidy up imports in wallet_importmulti.py
-rwxr-xr-x | test/functional/wallet_importmulti.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/functional/wallet_importmulti.py b/test/functional/wallet_importmulti.py index 0e99a6b364..b6159063e1 100755 --- a/test/functional/wallet_importmulti.py +++ b/test/functional/wallet_importmulti.py @@ -4,7 +4,13 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the importmulti RPC.""" -from test_framework import script +from test_framework.messages import sha256 +from test_framework.script import ( + CScript, + OP_0, + OP_NOP, + hash160 +) from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, @@ -13,12 +19,6 @@ from test_framework.util import ( bytes_to_hex_str, hex_str_to_bytes ) -from test_framework.script import ( - CScript, - OP_0, - hash160 -) -from test_framework.messages import sha256 class ImportMultiTest(BitcoinTestFramework): def set_test_params(self): @@ -112,7 +112,7 @@ class ImportMultiTest(BitcoinTestFramework): # Nonstandard scriptPubKey + !internal self.log.info("Should not import a nonstandard scriptPubKey without internal flag") - nonstandardScriptPubKey = address['scriptPubKey'] + bytes_to_hex_str(script.CScript([script.OP_NOP])) + nonstandardScriptPubKey = address['scriptPubKey'] + bytes_to_hex_str(CScript([OP_NOP])) address = self.nodes[0].getaddressinfo(self.nodes[0].getnewaddress()) result = self.nodes[1].importmulti([{ "scriptPubKey": nonstandardScriptPubKey, |