bugfix: assert walrus (":=") combo side-eff. breaks w/ asserts disabled
``` $ python3 -O Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> assert (x := 2) >>> x Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'x' is not defined ``` pity. it looked to be a neat and concise pattern.
This commit is contained in:
@@ -528,7 +528,8 @@ class DigitalBitbox_KeyStore(Hardware_KeyStore):
|
||||
if txin.is_coinbase_input():
|
||||
self.give_error("Coinbase not supported") # should never happen
|
||||
|
||||
assert (desc := txin.script_descriptor)
|
||||
desc = txin.script_descriptor
|
||||
assert desc
|
||||
if desc.to_legacy_electrum_script_type() != 'p2pkh':
|
||||
p2pkhTransaction = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user