1
0

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

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])