Bitcoin ABC  0.24.10
P2P Digital Currency
zmqpublishnotifier.h
Go to the documentation of this file.
1 // Copyright (c) 2015-2016 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 
9 
10 class CBlockIndex;
11 
13 private:
15  uint32_t nSequence{0U};
16 
17 public:
18  /* send zmq multipart message
19  parts:
20  * command
21  * data
22  * message sequence number
23  */
24  bool SendZmqMessage(const char *command, const void *data, size_t size);
25 
26  bool Initialize(void *pcontext) override;
27  void Shutdown() override;
28 };
29 
31 public:
32  bool NotifyBlock(const CBlockIndex *pindex) override;
33 };
34 
36 public:
37  bool NotifyTransaction(const CTransaction &transaction) override;
38 };
39 
41 public:
42  bool NotifyBlock(const CBlockIndex *pindex) override;
43 };
44 
46 public:
47  bool NotifyTransaction(const CTransaction &transaction) override;
48 };
49 
51 public:
52  bool NotifyBlockConnect(const CBlockIndex *pindex) override;
53  bool NotifyBlockDisconnect(const CBlockIndex *pindex) override;
54  bool NotifyTransactionAcceptance(const CTransaction &transaction,
55  uint64_t mempool_sequence) override;
56  bool NotifyTransactionRemoval(const CTransaction &transaction,
57  uint64_t mempool_sequence) override;
58 };
59 
60 #endif // BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H
zmqabstractnotifier.h
CZMQPublishSequenceNotifier::NotifyBlockDisconnect
bool NotifyBlockDisconnect(const CBlockIndex *pindex) override
Definition: zmqpublishnotifier.cpp:255
CZMQPublishSequenceNotifier::NotifyBlockConnect
bool NotifyBlockConnect(const CBlockIndex *pindex) override
Definition: zmqpublishnotifier.cpp:241
CZMQPublishRawBlockNotifier
Definition: zmqpublishnotifier.h:40
CZMQAbstractPublishNotifier::Shutdown
void Shutdown() override
Definition: zmqpublishnotifier.cpp:135
CTransaction
The basic transaction that is broadcasted on the network and contained in blocks.
Definition: transaction.h:194
CZMQAbstractPublishNotifier::nSequence
uint32_t nSequence
upcounting per message sequence number
Definition: zmqpublishnotifier.h:15
CZMQPublishSequenceNotifier
Definition: zmqpublishnotifier.h:50
CZMQPublishRawBlockNotifier::NotifyBlock
bool NotifyBlock(const CBlockIndex *pindex) override
Definition: zmqpublishnotifier.cpp:209
CZMQAbstractNotifier
Definition: zmqabstractnotifier.h:17
CZMQPublishHashBlockNotifier
Definition: zmqpublishnotifier.h:30
CZMQPublishSequenceNotifier::NotifyTransactionAcceptance
bool NotifyTransactionAcceptance(const CTransaction &transaction, uint64_t mempool_sequence) override
Definition: zmqpublishnotifier.cpp:269
CZMQPublishRawTransactionNotifier
Definition: zmqpublishnotifier.h:45
CZMQPublishHashTransactionNotifier::NotifyTransaction
bool NotifyTransaction(const CTransaction &transaction) override
Definition: zmqpublishnotifier.cpp:197
CZMQPublishHashTransactionNotifier
Definition: zmqpublishnotifier.h:35
CZMQAbstractPublishNotifier
Definition: zmqpublishnotifier.h:12
CZMQAbstractPublishNotifier::Initialize
bool Initialize(void *pcontext) override
Definition: zmqpublishnotifier.cpp:75
CZMQPublishRawTransactionNotifier::NotifyTransaction
bool NotifyTransaction(const CTransaction &transaction) override
Definition: zmqpublishnotifier.cpp:230
CZMQAbstractPublishNotifier::SendZmqMessage
bool SendZmqMessage(const char *command, const void *data, size_t size)
Definition: zmqpublishnotifier.cpp:166
CZMQPublishSequenceNotifier::NotifyTransactionRemoval
bool NotifyTransactionRemoval(const CTransaction &transaction, uint64_t mempool_sequence) override
Definition: zmqpublishnotifier.cpp:284
CBlockIndex
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: blockindex.h:23
CZMQPublishHashBlockNotifier::NotifyBlock
bool NotifyBlock(const CBlockIndex *pindex) override
Definition: zmqpublishnotifier.cpp:186