Skip to content

Commit 053344a

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

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

chia/full_node/consensus_store_sqlite3.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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)