Update transaction.py

This commit is contained in:
Aleksey Karpov 2019-03-14 03:11:47 +04:00 committed by GitHub
parent 181ce6b835
commit 8276905ebd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -434,7 +434,8 @@ class Transaction(dict):
elif type(address) in (Address, ScriptAddress):
script = address_to_script(address.address)
if script_pub_key:
assert script_pub_key == script
if script_pub_key != script:
raise Exception("address not match script")
else:
script_pub_key = script