From ee024b87364631bc6eb4dc1bd593e63d7482716d Mon Sep 17 00:00:00 2001 From: Rigidity <35380458+Rigidity@users.noreply.github.com> Date: Wed, 5 Jun 2024 07:32:47 -0400 Subject: [PATCH] CHIA-437: Add coin id index to coin state batching (#18052) Add coin id index to coin state batching --- chia/full_node/coin_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chia/full_node/coin_store.py b/chia/full_node/coin_store.py index 489a50a804a7..5d22aaa6ec6c 100644 --- a/chia/full_node/coin_store.py +++ b/chia/full_node/coin_store.py @@ -483,7 +483,7 @@ async def batch_coin_states_by_puzzle_hashes( if include_hinted: cursor = await conn.execute( f"SELECT confirmed_index, spent_index, coinbase, puzzle_hash, " - f"coin_parent, amount, timestamp FROM coin_record " + f"coin_parent, amount, timestamp FROM coin_record INDEXED BY sqlite_autoindex_coin_record_1 " f"WHERE coin_name IN (SELECT coin_id FROM hints " f'WHERE hint IN ({"?," * (puzzle_hash_count - 1)}?)) ' f"AND (confirmed_index>=? OR spent_index>=?) "