forked from LBRYCommunity/lbry-sdk
increment scema version and force specific indexes to be used for get_txos()
This commit is contained in:
parent
7cb530c334
commit
5cd7e9a9b8
2 changed files with 6 additions and 4 deletions
|
@ -387,7 +387,7 @@ def dict_row_factory(cursor, row):
|
|||
|
||||
class Database(SQLiteMixin):
|
||||
|
||||
SCHEMA_VERSION = "1.1"
|
||||
SCHEMA_VERSION = "1.2"
|
||||
|
||||
PRAGMAS = """
|
||||
pragma journal_mode=WAL;
|
||||
|
@ -633,7 +633,7 @@ class Database(SQLiteMixin):
|
|||
txo.id: txo for txo in
|
||||
(await self.get_txos(
|
||||
wallet=wallet,
|
||||
txid__in=txids[offset:offset+step],
|
||||
txid__in=txids[offset:offset+step], order_by='txo.txid',
|
||||
include_is_spent=include_is_spent,
|
||||
include_is_my_input=include_is_my_input,
|
||||
include_is_my_output=include_is_my_output,
|
||||
|
@ -646,7 +646,7 @@ class Database(SQLiteMixin):
|
|||
txo.id: txo for txo in
|
||||
(await self.get_txos(
|
||||
wallet=wallet,
|
||||
txoid__in=txi_txoids[offset:offset+step],
|
||||
txoid__in=txi_txoids[offset:offset+step], order_by='txo.txoid',
|
||||
include_is_my_output=include_is_my_output,
|
||||
))
|
||||
})
|
||||
|
|
|
@ -524,7 +524,9 @@ class Ledger(metaclass=LedgerRegistry):
|
|||
check_db_for_txos.append(txi.txo_ref.id)
|
||||
|
||||
referenced_txos = {} if not check_db_for_txos else {
|
||||
txo.id: txo for txo in await self.db.get_txos(txoid__in=check_db_for_txos, no_tx=True)
|
||||
txo.id: txo for txo in await self.db.get_txos(
|
||||
txoid__in=check_db_for_txos, order_by='txo.txoid', no_tx=True
|
||||
)
|
||||
}
|
||||
|
||||
for txi in tx.inputs:
|
||||
|
|
Loading…
Reference in a new issue