Skip to content

Commit 6fe2ef2

Browse files
committed
scripted-diff: Rename SendMessage to SendZmqMessage.
Windows headers define SendMessage as a macro, which leads to problems with the method name "SendMessage". To circumvent this, we rename the method to "SendZmqMessage". -BEGIN VERIFY SCRIPT- sed -i 's/SendMessage/SendZmqMessage/g' src/zmq/zmqpublishnotifier.* -END VERIFY SCRIPT-
1 parent a3ffb6e commit 6fe2ef2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/zmq/zmqpublishnotifier.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void CZMQAbstractPublishNotifier::Shutdown()
159159
psocket = nullptr;
160160
}
161161

162-
bool CZMQAbstractPublishNotifier::SendMessage(const char *command, const void* data, size_t size)
162+
bool CZMQAbstractPublishNotifier::SendZmqMessage(const char *command, const void* data, size_t size)
163163
{
164164
assert(psocket);
165165

@@ -183,7 +183,7 @@ bool CZMQPublishHashBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
183183
char data[32];
184184
for (unsigned int i = 0; i < 32; i++)
185185
data[31 - i] = hash.begin()[i];
186-
return SendMessage(MSG_HASHBLOCK, data, 32);
186+
return SendZmqMessage(MSG_HASHBLOCK, data, 32);
187187
}
188188

189189
bool CZMQPublishHashTransactionNotifier::NotifyTransaction(const CTransaction &transaction)
@@ -193,7 +193,7 @@ bool CZMQPublishHashTransactionNotifier::NotifyTransaction(const CTransaction &t
193193
char data[32];
194194
for (unsigned int i = 0; i < 32; i++)
195195
data[31 - i] = hash.begin()[i];
196-
return SendMessage(MSG_HASHTX, data, 32);
196+
return SendZmqMessage(MSG_HASHTX, data, 32);
197197
}
198198

199199
bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
@@ -214,7 +214,7 @@ bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
214214
ss << block;
215215
}
216216

217-
return SendMessage(MSG_RAWBLOCK, &(*ss.begin()), ss.size());
217+
return SendZmqMessage(MSG_RAWBLOCK, &(*ss.begin()), ss.size());
218218
}
219219

220220
bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &transaction)
@@ -223,5 +223,5 @@ bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &tr
223223
LogPrint(BCLog::ZMQ, "zmq: Publish rawtx %s\n", hash.GetHex());
224224
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags());
225225
ss << transaction;
226-
return SendMessage(MSG_RAWTX, &(*ss.begin()), ss.size());
226+
return SendZmqMessage(MSG_RAWTX, &(*ss.begin()), ss.size());
227227
}

src/zmq/zmqpublishnotifier.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class CZMQAbstractPublishNotifier : public CZMQAbstractNotifier
2222
* data
2323
* message sequence number
2424
*/
25-
bool SendMessage(const char *command, const void* data, size_t size);
25+
bool SendZmqMessage(const char *command, const void* data, size_t size);
2626

2727
bool Initialize(void *pcontext) override;
2828
void Shutdown() override;

0 commit comments

Comments
 (0)