Skip to content

Commit

Permalink
(WIP) Namecoin: Fix cp_height for Timewarp Hardfork
Browse files Browse the repository at this point in the history
TODO: Needs rebase once cp_height merged upstream.

Cherry-picked from 342728a
  • Loading branch information
JeremyRand committed Nov 7, 2019
1 parent b2dd935 commit e98e315
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion electrum_nmc/electrum/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ async def export_purported_checkpoints(self, cp_height, path):
# use lower timeout as we usually have network.bhi_lock here
timeout = self.network.get_network_timeout_seconds(NetworkTimeout.Urgent)

retarget_first_height = cp_height // 2016 * 2016
# first_height assumes checkpoint is after Timewarp Hardfork activation
retarget_first_height = cp_height // 2016 * 2016 - 1
retarget_last_height = (cp_height+1) // 2016 * 2016 - 1
retarget_last_chunk_index = (cp_height+1) // 2016 - 1

Expand Down

0 comments on commit e98e315

Please sign in to comment.