From 25cf7511586a8e3b879a9293000abaa36369f9e9 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Wed, 14 Jul 2021 13:04:40 -0400 Subject: [PATCH] update lookup_utxos --- lbry/wallet/server/leveldb.py | 72 ++++++++--------------------------- 1 file changed, 16 insertions(+), 56 deletions(-) diff --git a/lbry/wallet/server/leveldb.py b/lbry/wallet/server/leveldb.py index ed9d3fd48..ac0fc8fc5 100644 --- a/lbry/wallet/server/leveldb.py +++ b/lbry/wallet/server/leveldb.py @@ -1333,16 +1333,12 @@ class LevelDB: def read_utxos(): utxos = [] utxos_append = utxos.append - s_unpack = unpack fs_tx_hash = self.fs_tx_hash - # Key: b'u' + address_hashX + tx_idx + tx_num - # Value: the UTXO value as a 64-bit unsigned integer - prefix = DB_PREFIXES.UTXO_PREFIX.value + hashX - for db_key, db_value in self.db.iterator(prefix=prefix): - tx_pos, tx_num = s_unpack('