|
|
|
@ -108,7 +108,7 @@ class ImportMultiTest (BitcoinTestFramework):
@@ -108,7 +108,7 @@ class ImportMultiTest (BitcoinTestFramework):
|
|
|
|
|
"scriptPubKey": address['scriptPubKey'], |
|
|
|
|
"pubkeys": [ address['pubkey'] ], |
|
|
|
|
"internal": True |
|
|
|
|
}]; |
|
|
|
|
}] |
|
|
|
|
result = self.nodes[1].importmulti(request) |
|
|
|
|
assert_equal(result[0]['success'], True) |
|
|
|
|
address_assert = self.nodes[1].validateaddress(address['address']) |
|
|
|
@ -121,7 +121,7 @@ class ImportMultiTest (BitcoinTestFramework):
@@ -121,7 +121,7 @@ class ImportMultiTest (BitcoinTestFramework):
|
|
|
|
|
request = [{ |
|
|
|
|
"scriptPubKey": address['scriptPubKey'], |
|
|
|
|
"pubkeys": [ address['pubkey'] ] |
|
|
|
|
}]; |
|
|
|
|
}] |
|
|
|
|
result = self.nodes[1].importmulti(request) |
|
|
|
|
assert_equal(result[0]['success'], False) |
|
|
|
|
assert_equal(result[0]['error']['code'], -8) |
|
|
|
@ -197,7 +197,7 @@ class ImportMultiTest (BitcoinTestFramework):
@@ -197,7 +197,7 @@ class ImportMultiTest (BitcoinTestFramework):
|
|
|
|
|
self.nodes[1].generate(100) |
|
|
|
|
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) |
|
|
|
|
self.nodes[1].generate(1) |
|
|
|
|
transaction = self.nodes[1].gettransaction(transactionid); |
|
|
|
|
transaction = self.nodes[1].gettransaction(transactionid) |
|
|
|
|
|
|
|
|
|
print("Should import a p2sh") |
|
|
|
|
result = self.nodes[1].importmulti([{ |
|
|
|
@ -222,7 +222,7 @@ class ImportMultiTest (BitcoinTestFramework):
@@ -222,7 +222,7 @@ class ImportMultiTest (BitcoinTestFramework):
|
|
|
|
|
self.nodes[1].generate(100) |
|
|
|
|
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) |
|
|
|
|
self.nodes[1].generate(1) |
|
|
|
|
transaction = self.nodes[1].gettransaction(transactionid); |
|
|
|
|
transaction = self.nodes[1].gettransaction(transactionid) |
|
|
|
|
|
|
|
|
|
print("Should import a p2sh with respective redeem script") |
|
|
|
|
result = self.nodes[1].importmulti([{ |
|
|
|
@ -246,7 +246,7 @@ class ImportMultiTest (BitcoinTestFramework):
@@ -246,7 +246,7 @@ class ImportMultiTest (BitcoinTestFramework):
|
|
|
|
|
self.nodes[1].generate(100) |
|
|
|
|
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) |
|
|
|
|
self.nodes[1].generate(1) |
|
|
|
|
transaction = self.nodes[1].gettransaction(transactionid); |
|
|
|
|
transaction = self.nodes[1].gettransaction(transactionid) |
|
|
|
|
|
|
|
|
|
print("Should import a p2sh with respective redeem script and private keys") |
|
|
|
|
result = self.nodes[1].importmulti([{ |
|
|
|
@ -270,7 +270,7 @@ class ImportMultiTest (BitcoinTestFramework):
@@ -270,7 +270,7 @@ class ImportMultiTest (BitcoinTestFramework):
|
|
|
|
|
self.nodes[1].generate(100) |
|
|
|
|
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) |
|
|
|
|
self.nodes[1].generate(1) |
|
|
|
|
transaction = self.nodes[1].gettransaction(transactionid); |
|
|
|
|
transaction = self.nodes[1].gettransaction(transactionid) |
|
|
|
|
|
|
|
|
|
print("Should import a p2sh with respective redeem script and private keys") |
|
|
|
|
result = self.nodes[1].importmulti([{ |
|
|
|
@ -312,7 +312,7 @@ class ImportMultiTest (BitcoinTestFramework):
@@ -312,7 +312,7 @@ class ImportMultiTest (BitcoinTestFramework):
|
|
|
|
|
"scriptPubKey": address['scriptPubKey'], |
|
|
|
|
"pubkeys": [ address2['pubkey'] ], |
|
|
|
|
"internal": True |
|
|
|
|
}]; |
|
|
|
|
}] |
|
|
|
|
result = self.nodes[1].importmulti(request) |
|
|
|
|
assert_equal(result[0]['success'], False) |
|
|
|
|
assert_equal(result[0]['error']['code'], -5) |
|
|
|
|