mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 02:02:42 +02:00
Merge #9756: Return error when importmulti called with invalid address.
9acf25c Return error when importmulti called with invalid address. (Russell Yanofsky)
This commit is contained in:
@@ -64,6 +64,16 @@ class ImportMultiTest (BitcoinTestFramework):
|
||||
watchonly_address = address['address']
|
||||
watchonly_timestamp = timestamp
|
||||
|
||||
print("Should not import an invalid address")
|
||||
result = self.nodes[1].importmulti([{
|
||||
"scriptPubKey": {
|
||||
"address": "not valid address",
|
||||
},
|
||||
"timestamp": "now",
|
||||
}])
|
||||
assert_equal(result[0]['success'], False)
|
||||
assert_equal(result[0]['error']['code'], -5)
|
||||
assert_equal(result[0]['error']['message'], 'Invalid address')
|
||||
|
||||
# ScriptPubKey + internal
|
||||
print("Should import a scriptPubKey with internal flag")
|
||||
|
||||
Reference in New Issue
Block a user