transaction.py: wtxid is undefined for uncomplete txns

This commit is contained in:
SomberNight 2018-06-13 19:22:04 +02:00
parent e8b5bcf31e
commit 4193c7ff14
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

@ -988,6 +988,8 @@ class Transaction:
def wtxid(self):
self.deserialize()
if not self.is_complete():
return None
ser = self.serialize_to_network(witness=True)
return bh2u(Hash(bfh(ser))[::-1])