create coinbase transaction
This commit is contained in:
parent
16ae9a0e28
commit
eb9e0d9b72
@ -619,7 +619,7 @@ class Block():
|
|||||||
def calculate_commitment(self, witness = None):
|
def calculate_commitment(self, witness = None):
|
||||||
wtxid_list = [b"\x00" * 32,]
|
wtxid_list = [b"\x00" * 32,]
|
||||||
print(len(self.transactions))
|
print(len(self.transactions))
|
||||||
if not (len(self.transactions) == 1 and self.transactions[0].coinbase):
|
if self.transactions and not (len(self.transactions) == 1 and self.transactions[0].coinbase):
|
||||||
for tx in self.transactions[0 if not self.transactions[0].coinbase else 1:]:
|
for tx in self.transactions[0 if not self.transactions[0].coinbase else 1:]:
|
||||||
wtxid_list.append(tx.whash)
|
wtxid_list.append(tx.whash)
|
||||||
if witness is None:
|
if witness is None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user