diff --git a/pisa/block_processor.py b/pisa/block_processor.py index 83b0441..26f16c1 100644 --- a/pisa/block_processor.py +++ b/pisa/block_processor.py @@ -65,6 +65,7 @@ class BlockProcessor: return potential_matches @staticmethod + # NOTCOVERED def get_matches(potential_matches, locator_uuid_map, appointments): matches = [] @@ -89,6 +90,7 @@ class BlockProcessor: # DISCUSS: This method comes from the Responder and seems like it could go back there. @staticmethod + # NOTCOVERED def check_confirmations(txs, unconfirmed_txs, tx_job_map, missed_confirmations): for tx in txs: diff --git a/pisa/carrier.py b/pisa/carrier.py index 130cfca..a0dce76 100644 --- a/pisa/carrier.py +++ b/pisa/carrier.py @@ -17,6 +17,7 @@ class Receipt: class Carrier: + # NOTCOVERED def send_transaction(self, rawtx, txid): try: logger.info("Pushing transaction to the network", txid=txid, rawtx=rawtx) @@ -49,6 +50,8 @@ class Carrier: receipt = Receipt(delivered=True, confirmations=confirmations, reason=RPC_VERIFY_ALREADY_IN_CHAIN) else: + # WIP: It would be better to return and let the caller call again if necessary + # There's a really unlikely edge case where a transaction can be reorged between receiving the # notification and querying the data. In such a case we just resend self.send_transaction(rawtx, txid) diff --git a/pisa/tools.py b/pisa/tools.py index adba5e5..b1e76d0 100644 --- a/pisa/tools.py +++ b/pisa/tools.py @@ -7,12 +7,14 @@ from pisa.rpc_errors import RPC_INVALID_ADDRESS_OR_KEY from pisa.utils.auth_proxy import AuthServiceProxy, JSONRPCException +# NOTCOVERED def bitcoin_cli(): return AuthServiceProxy("http://%s:%s@%s:%d" % (conf.BTC_RPC_USER, conf.BTC_RPC_PASSWD, conf.BTC_RPC_HOST, conf.BTC_RPC_PORT)) # TODO: currently only used in the Responder; might move there or in the BlockProcessor +# NOTCOVERED def check_tx_in_chain(tx_id, logger=Logger(), tx_label='Transaction'): tx_in_chain = False confirmations = 0 @@ -39,6 +41,7 @@ def check_tx_in_chain(tx_id, logger=Logger(), tx_label='Transaction'): return tx_in_chain, confirmations +# NOTCOVERED def can_connect_to_bitcoind(): can_connect = True