diff --git a/pisa/responder.py b/pisa/responder.py index dbfac15..89b1096 100644 --- a/pisa/responder.py +++ b/pisa/responder.py @@ -126,9 +126,9 @@ class Responder: has missed. Used to trigger rebroadcast if needed. asleep (:obj:`bool`): A flag that signals whether the :obj:`Responder` is asleep or awake. block_queue (:obj:`Queue`): A queue used by the :obj:`Responder` to receive block hashes from ``bitcoind``. It - is populated by the :obj:`ZMQSubscriber `. - zmq_subscriber (:obj:`ZMQSubscriber `): a ``ZMQSubscriber`` instance - used to receive new block notifications from ``bitcoind``. + is populated by the :obj:`ChainMonitor `. + chain_monitor (:obj:`ChainMonitor `): a ``ChainMonitor`` instance used to track + new blocks received by ``bitcoind``. db_manager (:obj:`DBManager `): A ``DBManager`` instance to interact with the database. @@ -223,8 +223,7 @@ class Responder: The :obj:`TransactionTracker` is stored in ``trackers`` and ``tx_tracker_map`` and the ``penalty_txid`` added to ``unconfirmed_txs`` if ``confirmations=0``. Finally, the data is also stored in the database. - ``add_tracker`` awakes the :obj:`Responder` and creates a connection with the - :obj:`ZMQSubscriber ` if he is asleep. + ``add_tracker`` awakes the :obj:`Responder` if it is asleep. Args: uuid (:obj:`str`): a unique identifier for the appointment. diff --git a/pisa/watcher.py b/pisa/watcher.py index 1da5c75..079953b 100644 --- a/pisa/watcher.py +++ b/pisa/watcher.py @@ -27,7 +27,7 @@ class Watcher: If an appointment reaches its end with no breach, the data is simply deleted. The :class:`Watcher` receives information about new received blocks via the ``block_queue`` that is populated by the - :obj:`ZMQSubscriber `. + :obj:`ChainMonitor `. Args: db_manager (:obj:`DBManager `): a ``DBManager`` instance to interact with the database. @@ -45,11 +45,11 @@ class Watcher: appointments with the same ``locator``. asleep (:obj:`bool`): A flag that signals whether the :obj:`Watcher` is asleep or awake. block_queue (:obj:`Queue`): A queue used by the :obj:`Watcher` to receive block hashes from ``bitcoind``. It is - populated by the :obj:`ZMQSubscriber `. + populated by the :obj:`ChainMonitor `. max_appointments(:obj:`int`): the maximum amount of appointments that the :obj:`Watcher` will keep at any given time. - zmq_subscriber (:obj:`ZMQSubscriber `): a ZMQSubscriber instance used - to receive new block notifications from ``bitcoind``. + chain_monitor (:obj:`ChainMonitor `): a ``ChainMonitor`` instance used to track + new blocks received by ``bitcoind``. db_manager (:obj:`DBManager `): A db manager instance to interact with the database. Raises: diff --git a/test/pisa/unit/test_responder.py b/test/pisa/unit/test_responder.py index b3e339e..d515ff7 100644 --- a/test/pisa/unit/test_responder.py +++ b/test/pisa/unit/test_responder.py @@ -195,7 +195,7 @@ def test_add_bad_response(responder): tracker = create_dummy_tracker() # Now that the asleep / awake functionality has been tested we can avoid manually killing the responder by setting - # to awake. That will prevent the zmq thread to be launched again. + # to awake. That will prevent the chain_monitor thread to be launched again. responder.asleep = False # A txid instead of a rawtx should be enough for unit tests using the bitcoind mock, better tests are needed though.