Skip to content

Commit

Permalink
Workaround for 2.0.0-sweet
Browse files Browse the repository at this point in the history
  • Loading branch information
william-gr committed Dec 18, 2023
1 parent 1cefbf0 commit ecd5835
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pool/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ def get_chia_version(self) -> Optional[str]:
user_agent = self.headers.get('user-agent')
if not user_agent:
return

mapping = {
'2.0.0-sweet': '2.0.0',
}
if user_agent in mapping:
return Version(mapping[user_agent])

if user_agent.startswith('Chia Blockchain v.'):
try:
return Version('.'.join(user_agent.split('Chia Blockchain v.', 1)[-1].split('.', 3)[:3]))
Expand Down

0 comments on commit ecd5835

Please sign in to comment.