Skip to content

Commit 3f918fd

Browse files
committed
CoinStoreProtocol
1 parent 99a05dc commit 3f918fd

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

chia/full_node/consensus_store_sqlite3.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from chia.consensus.block_height_map import BlockHeightMap
1515
from chia.full_node.block_store import BlockStore
1616
from chia.full_node.coin_store import CoinStore
17+
from chia.full_node.coin_store_protocol import CoinStoreProtocol
1718
from chia.types.blockchain_format.coin import Coin
1819
from chia.types.coin_record import CoinRecord
1920
from chia.util.db_wrapper import DBWrapper2
@@ -22,7 +23,7 @@
2223
@dataclass
2324
class ConsensusStoreSQLite3Writer:
2425
block_store: BlockStore
25-
coin_store: CoinStore
26+
coin_store: CoinStoreProtocol
2627

2728
async def add_full_block(self, header_hash: bytes32, block: FullBlock, block_record: BlockRecord) -> None:
2829
await self.block_store.add_full_block(header_hash, block, block_record)
@@ -62,7 +63,7 @@ class ConsensusStoreSQLite3:
6263
"""
6364

6465
block_store: BlockStore
65-
coin_store: CoinStore
66+
coin_store: CoinStoreProtocol
6667
height_map: BlockHeightMap
6768

6869
# Writer context and writer facade for transactional writes (re-entrant via depth counter)

chia/full_node/full_node.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
from chia.full_node.block_store import BlockStore
5353
from chia.full_node.check_fork_next_block import check_fork_next_block
5454
from chia.full_node.coin_store import CoinStore
55+
from chia.full_node.coin_store_protocol import CoinStoreProtocol
5556
from chia.full_node.consensus_store_sqlite3 import ConsensusStoreSQLite3
5657
from chia.full_node.full_node_api import FullNodeAPI
5758
from chia.full_node.full_node_store import FullNodeStore, FullNodeStorePeakResult, UnfinishedBlockEntry
@@ -157,7 +158,7 @@ class FullNode:
157158
_db_wrapper: Optional[DBWrapper2] = None
158159
_hint_store: Optional[HintStore] = None
159160
_block_store: Optional[BlockStore] = None
160-
_coin_store: Optional[CoinStore] = None
161+
_coin_store: Optional[CoinStoreProtocol] = None
161162
_mempool_manager: Optional[MempoolManager] = None
162163
_init_weight_proof: Optional[asyncio.Task[None]] = None
163164
_blockchain: Optional[Blockchain] = None
@@ -418,7 +419,7 @@ def blockchain(self) -> Blockchain:
418419
return self._blockchain
419420

420421
@property
421-
def coin_store(self) -> CoinStore:
422+
def coin_store(self) -> CoinStoreProtocol:
422423
assert self._coin_store is not None
423424
return self._coin_store
424425

0 commit comments

Comments
 (0)