Skip to content

Commit d515c04

Browse files
committed
mypy
1 parent 867896c commit d515c04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chia/full_node/consensus_store_sqlite3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ConsensusStoreSQLite3:
6565

6666
# Writer context and writer facade for transactional writes (re-entrant via depth counter)
6767
_writer_ctx: Optional[AbstractAsyncContextManager[Any]] = None
68-
_writer: Optional[Any] = None
68+
_writer: Optional[ConsensusStoreSQLite3Writer] = None
6969
_txn_depth: int = 0
7070

7171
@classmethod
@@ -90,7 +90,7 @@ async def create(
9090
async def __aenter__(self) -> ConsensusStoreSQLite3Writer:
9191
# Re-entrant async context manager:
9292
# Begin a transaction only at the outermost level. CoinStore shares the same DB.
93-
if self._txn_depth == 0:
93+
if self._writer is None:
9494
self._writer_ctx = self.block_store.transaction()
9595
await self._writer_ctx.__aenter__()
9696
# Create writer facade bound to this transaction

0 commit comments

Comments
 (0)