Bitcoin ABC  0.22.12
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 SendMessage(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 
50 #endif // BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H
uint32_t nSequence
upcounting per message sequence number
virtual bool NotifyBlock(const CBlockIndex *pindex)
virtual bool NotifyTransaction(const CTransaction &transaction)
bool SendMessage(const char *command, const void *data, size_t size)
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: blockindex.h:23
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:211
bool Initialize(void *pcontext) override