Bitcoin Core  24.99.0
P2P Digital Currency
zmqpublishnotifier.h
Go to the documentation of this file.
1 // Copyright (c) 2015-2022 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 #include <cstddef>
11 #include <cstdint>
12 
13 class CBlockIndex;
14 class CTransaction;
15 
17 {
18 private:
19  uint32_t nSequence {0U};
20 
21 public:
22 
23  /* send zmq multipart message
24  parts:
25  * command
26  * data
27  * message sequence number
28  */
29  bool SendZmqMessage(const char *command, const void* data, size_t size);
30 
31  bool Initialize(void *pcontext) override;
32  void Shutdown() override;
33 };
34 
36 {
37 public:
38  bool NotifyBlock(const CBlockIndex *pindex) override;
39 };
40 
42 {
43 public:
44  bool NotifyTransaction(const CTransaction &transaction) override;
45 };
46 
48 {
49 public:
50  bool NotifyBlock(const CBlockIndex *pindex) override;
51 };
52 
54 {
55 public:
56  bool NotifyTransaction(const CTransaction &transaction) override;
57 };
58 
60 {
61 public:
62  bool NotifyBlockConnect(const CBlockIndex *pindex) override;
63  bool NotifyBlockDisconnect(const CBlockIndex *pindex) override;
64  bool NotifyTransactionAcceptance(const CTransaction &transaction, uint64_t mempool_sequence) override;
65  bool NotifyTransactionRemoval(const CTransaction &transaction, uint64_t mempool_sequence) override;
66 };
67 
68 #endif // BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H
const auto command
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:151
The basic transaction that is broadcasted on the network and contained in blocks.
Definition: transaction.h:295
bool SendZmqMessage(const char *command, const void *data, size_t size)
uint32_t nSequence
upcounting per message sequence number
bool Initialize(void *pcontext) override
bool NotifyBlock(const CBlockIndex *pindex) override
bool NotifyTransaction(const CTransaction &transaction) override
bool NotifyBlock(const CBlockIndex *pindex) override
bool NotifyTransaction(const CTransaction &transaction) override
bool NotifyTransactionAcceptance(const CTransaction &transaction, uint64_t mempool_sequence) override
bool NotifyTransactionRemoval(const CTransaction &transaction, uint64_t mempool_sequence) override
bool NotifyBlockConnect(const CBlockIndex *pindex) override
bool NotifyBlockDisconnect(const CBlockIndex *pindex) override