Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pybgl/classes/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ def mn(self, nonce):

header = self.h1 + s2rh(nonce) + self.h1
return sha3_256(header, 1)
cb = self.coinb1 + extra_nonce_1 + extra_nonce_2 + self.coinb2
time = s2rh(time)
cb = self.coinb1 + BlockTemplate.extra_nonce_1 + BlockTemplate.extra_nonce_2 + self.coinb2
time = s2rh(Block.time)
bits = s2rh(self.bits)
nonce = s2rh(nonce)
cbh = sha3_256(bytes_from_hex(cb))
c = Transaction(cb)
merkle_root = merkle_root_from_branches(self.merkle_branches, cbh)
header = version + prev_hash + merkle_root + time + bits + nonce
header = Block.version + BlockTemplate.prev_hash + merkle_root + Block.time + bits + nonce
block = header.hex()
block +=int_to_var_int(len (self.transactions) + 1).hex()
block += cb
Expand Down