Adds Inspector unittests. Fixes some related bugs.

This commit is contained in:
Sergi Delgado Segura
2019-10-07 15:18:00 +01:00
parent 067efcca73
commit 4be506412e
4 changed files with 270 additions and 146 deletions

View File

@@ -30,6 +30,18 @@ class BlockProcessor:
return block_hash
@staticmethod
def get_block_count():
block_count = None
try:
block_count = bitcoin_cli.getblockcount()
except JSONRPCException as e:
logging.error("[BlockProcessor] couldn't get block block count. Error code {}".format(e))
return block_count
@staticmethod
def get_potential_matches(txids, locator_uuid_map):
potential_locators = {sha256(binascii.unhexlify(txid)).hexdigest(): txid for txid in txids}