Skip to content

Commit

Permalink
make double sure we have fork_point
Browse files Browse the repository at this point in the history
  • Loading branch information
wjblanke authored and Yostra committed Jan 12, 2021
1 parent 0022fcd commit 3987948
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/full_node/full_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,15 @@ async def _sync(self):
self.log.info(f"Peak height {target_peak_sb_height}")
# send weight proof message, continue on first respons

# begin wjb make double sure we have fork_point
valid, fork_point_height = await self._fetch_and_validate_weight_proof(
peak_hash, self.server.get_full_node_connections(), target_peak_sb_height
)

if valid:
self.sync_store.add_potential_fork_point(peak_hash, fork_point_height)
#end wjb

if target_peak_sb_height < self.constants.SUB_EPOCH_SUB_BLOCKS:
self.log.info("first sub epoch, dont use weight proofs")
# todo work on this flow so we dont fetch redundant blocks
Expand Down

0 comments on commit 3987948

Please sign in to comment.