block template class
This commit is contained in:
parent
dfc84b6324
commit
faf30cdac4
@ -901,7 +901,7 @@ class BlockTemplate():
|
|||||||
cbh = double_sha256(unhexlify(cb))
|
cbh = double_sha256(unhexlify(cb))
|
||||||
merkle_root = merkleroot_from_branches(self.merkle_branches, cbh)
|
merkle_root = merkleroot_from_branches(self.merkle_branches, cbh)
|
||||||
header = version + prev_hash + merkle_root + time + bits + nonce
|
header = version + prev_hash + merkle_root + time + bits + nonce
|
||||||
block = hexlify(header)
|
block = hexlify(header).decode()
|
||||||
block += cb
|
block += cb
|
||||||
for t in self.transactions:
|
for t in self.transactions:
|
||||||
block += t["data"]
|
block += t["data"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user