diff --git a/lbry/wallet/server/leveldb.py b/lbry/wallet/server/leveldb.py index 0ee3939b6..125028327 100644 --- a/lbry/wallet/server/leveldb.py +++ b/lbry/wallet/server/leveldb.py @@ -287,6 +287,7 @@ def tx_merkle(tx_num, tx_height): stop=None if tx_height + 1 == len(tx_counts) else TX_HASH_PREFIX + util.pack_be_uint64(tx_counts[tx_height] - 1), include_key=False )) + # print("rocks txs", tx_height, list(map(hash_to_hex_str, block_txs))) if tx_height + 100 <= db_height: ctx.block_txs_cache[tx_height] = block_txs else: @@ -595,8 +596,9 @@ class LevelDB: tx_num += 1 offset += 32 - batch_put(TX_COUNTS_STATE, b''.join(map(util.pack_le_int64, self.tx_counts))) - + a = array.array('L') + a.fromlist(self.tx_counts) + batch_put(TX_COUNTS_STATE, a.tobytes()) flush_data.block_txs.clear() flush_data.block_hashes.clear() diff --git a/lbry/wallet/server/session.py b/lbry/wallet/server/session.py index 4a2a06a1b..ff3e12be7 100644 --- a/lbry/wallet/server/session.py +++ b/lbry/wallet/server/session.py @@ -1534,6 +1534,7 @@ class LBRYElectrumX(SessionBase): if block_hash: block = await self.daemon.deserialised_block(block_hash) height = block['height'] + # print('lbrycrd txs', height, block['tx']) try: pos = block['tx'].index(tx_hash) except ValueError: