Skip to content

Commit f7b4ff1

Browse files
Fix crash when the only index in config is head (#325)
1 parent 78f25f6 commit f7b4ff1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Fixed
66

7+
* index: Fixed crash when the only index in config is `head`.
78
* index: Fixed fetching originations during initial sync.
89

910
## 5.0.3 - 2022-05-04

src/dipdup/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
from dipdup.datasources.metadata.enums import MetadataNetwork
4242
from dipdup.datasources.subscription import BigMapSubscription
43+
from dipdup.datasources.subscription import HeadSubscription
4344
from dipdup.datasources.subscription import OriginationSubscription
4445
from dipdup.datasources.subscription import Subscription
4546
from dipdup.datasources.subscription import TransactionSubscription
@@ -1395,9 +1396,8 @@ def _resolve_index_subscriptions(self, index_config: IndexConfigT) -> None:
13951396
address, path = big_map_handler_config.contract_config.address, big_map_handler_config.path
13961397
index_config.subscriptions.add(BigMapSubscription(address=address, path=path))
13971398

1398-
# NOTE: HeadSubscription is always enabled
13991399
elif isinstance(index_config, HeadIndexConfig):
1400-
pass
1400+
index_config.subscriptions.add(HeadSubscription())
14011401

14021402
else:
14031403
raise NotImplementedError(f'Index kind `{index_config.kind}` is not supported')

0 commit comments

Comments
 (0)