faster get_hashX_status

This commit is contained in:
Jack Robison 2022-04-06 22:00:41 -04:00
parent d323edd252
commit b1bb5927c7
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -851,12 +851,12 @@ class HubDB:
self.prefix_db = None
def get_hashX_status(self, hashX: bytes):
mempool_status = self.prefix_db.hashX_mempool_status.get(hashX)
mempool_status = self.prefix_db.hashX_mempool_status.get(hashX, deserialize_value=False)
if mempool_status:
return mempool_status.status.hex()
status = self.prefix_db.hashX_status.get(hashX)
return mempool_status.hex()
status = self.prefix_db.hashX_status.get(hashX, deserialize_value=False)
if status:
return status.status.hex()
return status.hex()
def get_tx_hash(self, tx_num: int) -> bytes:
if self._cache_all_tx_hashes: