Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vhf committed Sep 4, 2021
1 parent 580f124 commit 61b6274
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/dipdup/dipdup.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ async def _initialize_database(self, reindex: bool = False) -> None:
await schema_state.save()
elif schema_state.index_hash != schema_hash:
self._logger.warning('Schema hash mismatch, reindexing')
#await self._ctx.reindex()
# await self._ctx.reindex()

await self._execute_sql_scripts(reindex=False)

Expand Down
4 changes: 2 additions & 2 deletions src/dipdup/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ async def _initialize_index_state(self) -> None:

elif state.index_hash != index_config_hash:
self._logger.warning('Config hash mismatch (config has been changed), reindexing')
#await self._ctx.reindex()
# await self._ctx.reindex()

self._logger.info('%s', f'{state.level=} {state.hash=}'.replace('state.', ''))
# NOTE: No need to check indexes which are not synchronized.
if state.level and state.hash:
block = await self._datasource.get_block(state.level)
if state.hash != block.hash:
self._logger.warning('Block hash mismatch (missed rollback while dipdup was stopped), reindexing')
#await self._ctx.reindex()
# await self._ctx.reindex()

await state.save()
self._state = state
Expand Down
4 changes: 1 addition & 3 deletions src/hicdex/handlers/on_split_sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ async def on_split_sign(
token, _ = await models.Token.get_or_create(id=int(objkt_id))
contract = await models.SplitContract.filter(contract_id=token.creator_id).get() # type: ignore

signature, _ = await models.Signatures.get_or_create(holder_id=sender, token_id=token.id)
#signature = models.Signatures(holder_id=sender, token_id=token.id)
#await signature.save()
await models.Signatures.get_or_create(holder_id=sender, token_id=token.id)

core_participants = await models.Shareholder.filter(
split_contract=contract, holder_type=models.ShareholderStatus.core_participant
Expand Down

0 comments on commit 61b6274

Please sign in to comment.