File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ class ConsensusStoreSQLite3:
65
65
66
66
# Writer context and writer facade for transactional writes (re-entrant via depth counter)
67
67
_writer_ctx : Optional [AbstractAsyncContextManager [Any ]] = None
68
- _writer : Optional [Any ] = None
68
+ _writer : Optional [ConsensusStoreSQLite3Writer ] = None
69
69
_txn_depth : int = 0
70
70
71
71
@classmethod
@@ -90,7 +90,7 @@ async def create(
90
90
async def __aenter__ (self ) -> ConsensusStoreSQLite3Writer :
91
91
# Re-entrant async context manager:
92
92
# 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 :
94
94
self ._writer_ctx = self .block_store .transaction ()
95
95
await self ._writer_ctx .__aenter__ ()
96
96
# Create writer facade bound to this transaction
You can’t perform that action at this time.
0 commit comments