Skip to content

Commit

Permalink
tiny fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Dec 14, 2024
1 parent e5b5374 commit a290961
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/dipdup/datasources/substrate_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,14 @@ async def _on_message(self, message: Message) -> None:
self._requests[data['id']] = (self._requests[data['id']][0], data)
self._requests[data['id']][0].set()

self._requests[data['id']] = (self._requests[data['id']][0], data)
self._requests[data['id']][0].set()

# NOTE: Possibly unreliable logic from evm_node, and possibly too time consuming for message handling
level = await self.get_head_level()
self._subscriptions.set_sync_level(self._pending_subscription, level)

# NOTE: Set None to identify possible subscriptions conflicts
self._pending_subscription = None
else:
raise Exception
elif 'method' in data and data['method'].startswith('chain_'):
subscription_id = data['params']['subscription']
if subscription_id not in self._subscription_ids:
Expand Down
2 changes: 1 addition & 1 deletion src/dipdup/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __int__(self) -> int:

raise TypeError('Cannot convert a parent metric to an integer')

def __repr__(self) -> str:
def __str__(self) -> str:
return str(self.value)


Expand Down

0 comments on commit a290961

Please sign in to comment.