forked from LBRYCommunity/lbry-sdk
optimize insert key loop
This commit is contained in:
parent
87c210952b
commit
6bdd9c9d78
1 changed files with 4 additions and 5 deletions
|
@ -480,11 +480,10 @@ class BaseDatabase(SQLiteMixin):
|
||||||
) + ', '.join(['(?, ?, ?, ?, ?)'] * len(keys))
|
) + ', '.join(['(?, ?, ?, ?, ?)'] * len(keys))
|
||||||
values = []
|
values = []
|
||||||
for position, pubkey in keys:
|
for position, pubkey in keys:
|
||||||
values.append(pubkey.address)
|
values.extend([
|
||||||
values.append(account.public_key.address)
|
pubkey.address, account.public_key.address, chain, position,
|
||||||
values.append(chain)
|
sqlite3.Binary(pubkey.pubkey_bytes)
|
||||||
values.append(position)
|
])
|
||||||
values.append(sqlite3.Binary(pubkey.pubkey_bytes))
|
|
||||||
return self.run_operation(sql, values)
|
return self.run_operation(sql, values)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in a new issue