Skip to content

Commit

Permalink
More follow-up to 37c4ef5
Browse files Browse the repository at this point in the history
Paranoia: invalidate the common sighash cache if the call path passes
through deserialize() successfully (deserialize usually short circuit
aborts if it's a redundant deserialization but if it proceeds we should
definitely invalitate the cache if it exists).
  • Loading branch information
cculianu committed Nov 13, 2019
1 parent 3a81c25 commit ed9bc8c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ def deserialize(self):
if self._inputs is not None:
return
d = deserialize(self.raw)
self.invalidate_common_sighash_cache()
self._inputs = d['inputs']
self._outputs = [(x['type'], x['address'], x['value']) for x in d['outputs']]
assert all(isinstance(output[1], (PublicKey, Address, ScriptOutput))
Expand Down

0 comments on commit ed9bc8c

Please sign in to comment.