LCOV - code coverage report
Current view: top level - src/zmq - zmqpublishnotifier.h (source / functions) Hit Total Coverage
Test: total_coverage.info Lines: 6 6 100.0 %
Date: 2020-09-26 01:30:44 Functions: 22 24 91.7 %

          Line data    Source code
       1             : // Copyright (c) 2015-2018 The Bitcoin Core developers
       2             : // Distributed under the MIT software license, see the accompanying
       3             : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4             : 
       5             : #ifndef BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H
       6             : #define BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H
       7             : 
       8             : #include <zmq/zmqabstractnotifier.h>
       9             : 
      10             : class CBlockIndex;
      11             : 
      12          24 : class CZMQAbstractPublishNotifier : public CZMQAbstractNotifier
      13             : {
      14             : private:
      15           8 :     uint32_t nSequence {0U}; //!< upcounting per message sequence number
      16             : 
      17             : public:
      18             : 
      19             :     /* send zmq multipart message
      20             :        parts:
      21             :           * command
      22             :           * data
      23             :           * message sequence number
      24             :     */
      25             :     bool SendMessage(const char *command, const void* data, size_t size);
      26             : 
      27             :     bool Initialize(void *pcontext) override;
      28             :     void Shutdown() override;
      29             : };
      30             : 
      31          10 : class CZMQPublishHashBlockNotifier : public CZMQAbstractPublishNotifier
      32             : {
      33             : public:
      34             :     bool NotifyBlock(const CBlockIndex *pindex) override;
      35             : };
      36             : 
      37          15 : class CZMQPublishHashTransactionNotifier : public CZMQAbstractPublishNotifier
      38             : {
      39             : public:
      40             :     bool NotifyTransaction(const CTransaction &transaction) override;
      41             : };
      42             : 
      43           5 : class CZMQPublishRawBlockNotifier : public CZMQAbstractPublishNotifier
      44             : {
      45             : public:
      46             :     bool NotifyBlock(const CBlockIndex *pindex) override;
      47             : };
      48             : 
      49          10 : class CZMQPublishRawTransactionNotifier : public CZMQAbstractPublishNotifier
      50             : {
      51             : public:
      52             :     bool NotifyTransaction(const CTransaction &transaction) override;
      53             : };
      54             : 
      55             : #endif // BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H

Generated by: LCOV version 1.15