Skip to content

Commit

Permalink
Merge pull request #25 from UnitedBitcoin/posdev
Browse files Browse the repository at this point in the history
commit to master branch
  • Loading branch information
harryub committed Aug 6, 2018
2 parents c6acb95 + a8857c9 commit 02e74fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,16 @@ def get_next_target_require(self,height,is_pos):
tempBits.add(first["bits"])
for i in range(9):
last_header,height = self.get_last_block_header(height-1,is_pos)
tNbits.append(last_header)
tempBits.add(last_header["bits"])

if is_pos and height <= util.ForkData.third_fork_height:
return util.ub_default_diffculty(is_pos)
if last_header is None :
if is_pos:
return util.ub_default_diffculty(is_pos)
else:
return self.get_third_fork_pow_difficult()
tNbits.append(last_header)
tempBits.add(last_header["bits"])
if len(tempBits)>1:
return self.bits_to_target(first["bits"])

Expand Down

0 comments on commit 02e74fa

Please sign in to comment.