remove dead code

This commit is contained in:
Jack Robison 2020-11-17 16:17:24 -05:00
parent 48aeb26e02
commit 632d8d02d2
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
2 changed files with 0 additions and 22 deletions

View file

@ -426,19 +426,6 @@ class LevelDB:
return await asyncio.get_event_loop().run_in_executor(self.executor, read_headers)
async def fs_block_tx_hashes(self, height):
def _get_tx_hashes():
return self.tx_db.get(BLOCK_HASH_PREFIX + util.pack_be_uint64(height)).hex().decode(), list(map(
lambda tx_hash: hash_to_hex_str(tx_hash).decode(),
self.tx_db.iterator(
start=TX_HASH_PREFIX + util.pack_be_uint64(self.tx_counts[height - 1]),
stop=None if height + 1 == len(self.tx_counts) else TX_HASH_PREFIX + util.pack_be_uint64(self.tx_counts[height]),
include_key=False
)
))
return await asyncio.get_event_loop().run_in_executor(self.executor, _get_tx_hashes)
def fs_tx_hash(self, tx_num):
"""Return a par (tx_hash, tx_height) for the given tx number.

View file

@ -1585,15 +1585,6 @@ class LBRYElectrumX(SessionBase):
return await self.daemon_request('getrawtransaction', tx_hash, verbose)
async def _block_hash_and_tx_hashes(self, height):
"""Returns a pair (block_hash, tx_hashes) for the main chain block at
the given height.
block_hash is a hexadecimal string, and tx_hashes is an
ordered list of hexadecimal strings.
"""
return await self.db.fs_block_tx_hashes(height)
def _get_merkle_branch(self, tx_hashes, tx_pos):
"""Return a merkle branch to a transaction.