Skip to content

Commit acfd7d5

Browse files
committed
Remove ConsensusStoreWriterSQLite3.writer method
1 parent 4f7e799 commit acfd7d5

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

chia/full_node/consensus_store_sqlite3.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from chia_rs import BlockRecord, FullBlock, SubEpochChallengeSegment, SubEpochSummary
1010
from chia_rs.sized_bytes import bytes32
1111
from chia_rs.sized_ints import uint32, uint64
12-
from typing_extensions import Self, final
12+
from typing_extensions import final
1313

1414
from chia.consensus.block_height_map import BlockHeightMap
1515
from chia.full_node.block_store import BlockStore
@@ -56,12 +56,6 @@ async def new_block(
5656
) -> None:
5757
await self.coin_store.new_block(height, timestamp, included_reward_coins, tx_additions, tx_removals)
5858

59-
@asynccontextmanager
60-
async def writer(self) -> AsyncIterator[Self]:
61-
# Return self as the writer facade
62-
async with self.block_store.transaction():
63-
yield self
64-
6559

6660
@dataclass
6761
class ConsensusStoreSQLite3:
@@ -105,8 +99,8 @@ async def create(
10599
async def writer(self) -> AsyncIterator[ConsensusStoreSQLite3Writer]:
106100
"""Async context manager that yields a writer facade for performing transactional writes."""
107101
csw = ConsensusStoreSQLite3Writer(self.block_store, self.coin_store)
108-
async with csw.writer() as writer:
109-
yield writer
102+
async with self.block_store.transaction():
103+
yield csw
110104

111105
# Block store methods
112106

0 commit comments

Comments
 (0)