Skip to content

Commit

Permalink
fix target
Browse files Browse the repository at this point in the history
  • Loading branch information
y-chan authored May 20, 2019
1 parent 038f34a commit 6ae0cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions electrum/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,10 @@ def get_target_dgwv3(self, height, chain=None) -> int:

# DGWv3 PastBlocks = 24 Because checkpoint don't have preblock data.
if height < len(self.checkpoints)*2016 + PastBlocks:
return 0, 0
return 0

if last is None or height-1 < PastBlocks:
return 0x1e3fffff, MAX_TARGET
return 0x1e3fffff

for i in range(1, PastBlocks + 1):
bnTarget = self.bits_to_target(pindex.get('bits'))
Expand Down

0 comments on commit 6ae0cb1

Please sign in to comment.