Bitcoin ABC  0.29.1
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
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: blockindex.h:26
The basic transaction that is broadcasted on the network and contained in blocks.
Definition: transaction.h:192
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