Skip to content

Commit

Permalink
fix fork point calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
pdxwebdev committed Jul 8, 2023
1 parent cdd535c commit 0e48ed4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions yadacoin/core/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def get_fork_for_block_height(cls, height):
}

@classmethod
def get_nodes_for_block_height(cls, height, fork_point=None):
def get_nodes_for_block_height(cls, height):
fork_point = cls.get_fork_for_block_height(height)
if fork_point is None:
fork_point = cls.get_fork_for_block_height(height)
if fork_point not in cls._get_nodes_for_block_height_cache[cls.__name__]:
Expand All @@ -31,12 +32,11 @@ def get_nodes_for_block_height(cls, height, fork_point=None):

@classmethod
def get_all_nodes_for_block_height(cls, height):
fork_point = cls.get_fork_for_block_height(height)
return (
Seeds.get_nodes_for_block_height(height, fork_point)
+ SeedGateways.get_nodes_for_block_height(height, fork_point)
+ ServiceProviders.get_nodes_for_block_height(height, fork_point),
)[fork_point]
Seeds.get_nodes_for_block_height(height)
+ SeedGateways.get_nodes_for_block_height(height)
+ ServiceProviders.get_nodes_for_block_height(height),
)[0]

@classmethod
def get_all_nodes_indexed_by_address_for_block_height(cls, height):
Expand Down

0 comments on commit 0e48ed4

Please sign in to comment.