Bitcoin Core  22.99.0
P2P Digital Currency
zmqpublishnotifier.h
Go to the documentation of this file.
1 // Copyright (c) 2015-2020 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 {
14 private:
15  uint32_t nSequence {0U};
16 
17 public:
18 
19  /* send zmq multipart message
20  parts:
21  * command
22  * data
23  * message sequence number
24  */
25  bool SendZmqMessage(const char *command, const void* data, size_t size);
26 
27  bool Initialize(void *pcontext) override;
28  void Shutdown() override;
29 };
30 
32 {
33 public:
34  bool NotifyBlock(const CBlockIndex *pindex) override;
35 };
36 
38 {
39 public:
40  bool NotifyTransaction(const CTransaction &transaction) override;
41 };
42 
44 {
45 public:
46  bool NotifyBlock(const CBlockIndex *pindex) override;
47 };
48 
50 {
51 public:
52  bool NotifyTransaction(const CTransaction &transaction) override;
53 };
54 
56 {
57 public:
58  bool NotifyBlockConnect(const CBlockIndex *pindex) override;
59  bool NotifyBlockDisconnect(const CBlockIndex *pindex) override;
60  bool NotifyTransactionAcceptance(const CTransaction &transaction, uint64_t mempool_sequence) override;
61  bool NotifyTransactionRemoval(const CTransaction &transaction, uint64_t mempool_sequence) override;
62 };
63 
64 #endif // BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H
zmqabstractnotifier.h
CZMQPublishSequenceNotifier::NotifyBlockDisconnect
bool NotifyBlockDisconnect(const CBlockIndex *pindex) override
Definition: zmqpublishnotifier.cpp:276
CZMQPublishSequenceNotifier::NotifyBlockConnect
bool NotifyBlockConnect(const CBlockIndex *pindex) override
Definition: zmqpublishnotifier.cpp:269
CZMQPublishRawBlockNotifier
Definition: zmqpublishnotifier.h:43
CZMQAbstractPublishNotifier::Shutdown
void Shutdown() override
Definition: zmqpublishnotifier.cpp:158
CTransaction
The basic transaction that is broadcasted on the network and contained in blocks.
Definition: transaction.h:259
CZMQAbstractPublishNotifier::nSequence
uint32_t nSequence
upcounting per message sequence number
Definition: zmqpublishnotifier.h:15
CZMQPublishSequenceNotifier
Definition: zmqpublishnotifier.h:55
CZMQPublishRawBlockNotifier::NotifyBlock
bool NotifyBlock(const CBlockIndex *pindex) override
Definition: zmqpublishnotifier.cpp:226
CZMQAbstractNotifier
Definition: zmqabstractnotifier.h:18
CZMQPublishHashBlockNotifier
Definition: zmqpublishnotifier.h:31
CZMQPublishSequenceNotifier::NotifyTransactionAcceptance
bool NotifyTransactionAcceptance(const CTransaction &transaction, uint64_t mempool_sequence) override
Definition: zmqpublishnotifier.cpp:283
CZMQPublishRawTransactionNotifier
Definition: zmqpublishnotifier.h:49
CZMQPublishHashTransactionNotifier::NotifyTransaction
bool NotifyTransaction(const CTransaction &transaction) override
Definition: zmqpublishnotifier.cpp:216
CZMQPublishHashTransactionNotifier
Definition: zmqpublishnotifier.h:37
CZMQAbstractPublishNotifier
Definition: zmqpublishnotifier.h:12
CZMQAbstractPublishNotifier::Initialize
bool Initialize(void *pcontext) override
Definition: zmqpublishnotifier.cpp:91
CZMQPublishRawTransactionNotifier::NotifyTransaction
bool NotifyTransaction(const CTransaction &transaction) override
Definition: zmqpublishnotifier.cpp:247
CZMQAbstractPublishNotifier::SendZmqMessage
bool SendZmqMessage(const char *command, const void *data, size_t size)
Definition: zmqpublishnotifier.cpp:189
CZMQPublishSequenceNotifier::NotifyTransactionRemoval
bool NotifyTransactionRemoval(const CTransaction &transaction, uint64_t mempool_sequence) override
Definition: zmqpublishnotifier.cpp:290
CBlockIndex
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:137
CZMQPublishHashBlockNotifier::NotifyBlock
bool NotifyBlock(const CBlockIndex *pindex) override
Definition: zmqpublishnotifier.cpp:206