Skip to content

Commit e66870c

Browse files
committed
zmq: Append address to notify log output
1 parent 241803d commit e66870c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/zmq/zmqpublishnotifier.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ bool CZMQAbstractPublishNotifier::SendZmqMessage(const char *command, const void
180180
bool CZMQPublishHashBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
181181
{
182182
uint256 hash = pindex->GetBlockHash();
183-
LogPrint(BCLog::ZMQ, "zmq: Publish hashblock %s\n", hash.GetHex());
183+
LogPrint(BCLog::ZMQ, "zmq: Publish hashblock %s to %s\n", hash.GetHex(), this->address);
184184
char data[32];
185185
for (unsigned int i = 0; i < 32; i++)
186186
data[31 - i] = hash.begin()[i];
@@ -190,7 +190,7 @@ bool CZMQPublishHashBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
190190
bool CZMQPublishHashTransactionNotifier::NotifyTransaction(const CTransaction &transaction)
191191
{
192192
uint256 hash = transaction.GetHash();
193-
LogPrint(BCLog::ZMQ, "zmq: Publish hashtx %s\n", hash.GetHex());
193+
LogPrint(BCLog::ZMQ, "zmq: Publish hashtx %s to %s\n", hash.GetHex(), this->address);
194194
char data[32];
195195
for (unsigned int i = 0; i < 32; i++)
196196
data[31 - i] = hash.begin()[i];
@@ -199,7 +199,7 @@ bool CZMQPublishHashTransactionNotifier::NotifyTransaction(const CTransaction &t
199199

200200
bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
201201
{
202-
LogPrint(BCLog::ZMQ, "zmq: Publish rawblock %s\n", pindex->GetBlockHash().GetHex());
202+
LogPrint(BCLog::ZMQ, "zmq: Publish rawblock %s to %s\n", pindex->GetBlockHash().GetHex(), this->address);
203203

204204
const Consensus::Params& consensusParams = Params().GetConsensus();
205205
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags());
@@ -221,7 +221,7 @@ bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
221221
bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &transaction)
222222
{
223223
uint256 hash = transaction.GetHash();
224-
LogPrint(BCLog::ZMQ, "zmq: Publish rawtx %s\n", hash.GetHex());
224+
LogPrint(BCLog::ZMQ, "zmq: Publish rawtx %s to %s\n", hash.GetHex(), this->address);
225225
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags());
226226
ss << transaction;
227227
return SendZmqMessage(MSG_RAWTX, &(*ss.begin()), ss.size());
@@ -232,7 +232,7 @@ bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &tr
232232
bool CZMQPublishSequenceNotifier::NotifyBlockConnect(const CBlockIndex *pindex)
233233
{
234234
uint256 hash = pindex->GetBlockHash();
235-
LogPrint(BCLog::ZMQ, "zmq: Publish sequence block connect %s\n", hash.GetHex());
235+
LogPrint(BCLog::ZMQ, "zmq: Publish sequence block connect %s to %s\n", hash.GetHex(), this->address);
236236
char data[sizeof(uint256)+1];
237237
for (unsigned int i = 0; i < sizeof(uint256); i++)
238238
data[sizeof(uint256) - 1 - i] = hash.begin()[i];
@@ -243,7 +243,7 @@ bool CZMQPublishSequenceNotifier::NotifyBlockConnect(const CBlockIndex *pindex)
243243
bool CZMQPublishSequenceNotifier::NotifyBlockDisconnect(const CBlockIndex *pindex)
244244
{
245245
uint256 hash = pindex->GetBlockHash();
246-
LogPrint(BCLog::ZMQ, "zmq: Publish sequence block disconnect %s\n", hash.GetHex());
246+
LogPrint(BCLog::ZMQ, "zmq: Publish sequence block disconnect %s to %s\n", hash.GetHex(), this->address);
247247
char data[sizeof(uint256)+1];
248248
for (unsigned int i = 0; i < sizeof(uint256); i++)
249249
data[sizeof(uint256) - 1 - i] = hash.begin()[i];
@@ -254,7 +254,7 @@ bool CZMQPublishSequenceNotifier::NotifyBlockDisconnect(const CBlockIndex *pinde
254254
bool CZMQPublishSequenceNotifier::NotifyTransactionAcceptance(const CTransaction &transaction, uint64_t mempool_sequence)
255255
{
256256
uint256 hash = transaction.GetHash();
257-
LogPrint(BCLog::ZMQ, "zmq: Publish hashtx mempool acceptance %s\n", hash.GetHex());
257+
LogPrint(BCLog::ZMQ, "zmq: Publish hashtx mempool acceptance %s to %s\n", hash.GetHex(), this->address);
258258
unsigned char data[sizeof(uint256)+sizeof(mempool_sequence)+1];
259259
for (unsigned int i = 0; i < sizeof(uint256); i++)
260260
data[sizeof(uint256) - 1 - i] = hash.begin()[i];
@@ -266,7 +266,7 @@ bool CZMQPublishSequenceNotifier::NotifyTransactionAcceptance(const CTransaction
266266
bool CZMQPublishSequenceNotifier::NotifyTransactionRemoval(const CTransaction &transaction, uint64_t mempool_sequence)
267267
{
268268
uint256 hash = transaction.GetHash();
269-
LogPrint(BCLog::ZMQ, "zmq: Publish hashtx mempool removal %s\n", hash.GetHex());
269+
LogPrint(BCLog::ZMQ, "zmq: Publish hashtx mempool removal %s to %s\n", hash.GetHex(), this->address);
270270
unsigned char data[sizeof(uint256)+sizeof(mempool_sequence)+1];
271271
for (unsigned int i = 0; i < sizeof(uint256); i++)
272272
data[sizeof(uint256) - 1 - i] = hash.begin()[i];

0 commit comments

Comments
 (0)