block template class

This commit is contained in:
4tochka 2018-04-01 10:23:33 +04:00
parent faf30cdac4
commit 6848a7e975

View File

@ -902,6 +902,7 @@ class BlockTemplate():
merkle_root = merkleroot_from_branches(self.merkle_branches, cbh)
header = version + prev_hash + merkle_root + time + bits + nonce
block = hexlify(header).decode()
block += to_var_int(len (self.transactions)+1)
block += cb
for t in self.transactions:
block += t["data"]