Skip to content

Commit bba142d

Browse files
Enable early realtime mode when config contains bigmap indexes with skip_history (#655)
1 parent a684712 commit bba142d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
66

7+
## [Unreleased]
8+
9+
### Fixes
10+
11+
- config: Enable early realtime mode when config contains bigmap indexes with `skip_history`.
12+
713
## [6.5.4] - 2022-03-31
814

915
### Fixed

src/dipdup/config.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,6 +1692,13 @@ def _validate(self) -> None:
16921692
f'`{name}`: `buffer_size` option is incompatible with `advanced.rollback_depth`'
16931693
)
16941694

1695+
# NOTE: Bigmap indexes with `skip_history` require early realtime
1696+
for name, index_config in self.indexes.items():
1697+
if isinstance(index_config, BigMapIndexConfig) and index_config.skip_history != SkipHistory.never:
1698+
_logger.warning('`%s` index is configured to skip history; enabling early realtime', name)
1699+
self.advanced.early_realtime = True
1700+
break
1701+
16951702
def _resolve_template(self, template_config: IndexTemplateConfig) -> None:
16961703
_logger.debug('Resolving index config `%s` from template `%s`', template_config.name, template_config.template)
16971704

0 commit comments

Comments
 (0)