aboutsummaryrefslogtreecommitdiff
path: root/src/zmq
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-01-31 17:03:54 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-01-31 16:53:12 +0100
commitfa2406a50a83184d101d1bb3f2b282ae280370ba (patch)
treefe1ad47cd0c2a7f85d88b6273a06d701bcb53177 /src/zmq
parent0ff13913287b3874e305535c78bc43b190217168 (diff)
zmq: Fix implicit-integer-sign-change
Diffstat (limited to 'src/zmq')
-rw-r--r--src/zmq/zmqpublishnotifier.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/zmq/zmqpublishnotifier.cpp b/src/zmq/zmqpublishnotifier.cpp
index 543db10612..2c6f24a239 100644
--- a/src/zmq/zmqpublishnotifier.cpp
+++ b/src/zmq/zmqpublishnotifier.cpp
@@ -209,9 +209,10 @@ bool CZMQPublishHashBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
{
uint256 hash = pindex->GetBlockHash();
LogPrint(BCLog::ZMQ, "zmq: Publish hashblock %s to %s\n", hash.GetHex(), this->address);
- char data[32];
- for (unsigned int i = 0; i < 32; i++)
+ uint8_t data[32];
+ for (unsigned int i = 0; i < 32; i++) {
data[31 - i] = hash.begin()[i];
+ }
return SendZmqMessage(MSG_HASHBLOCK, data, 32);
}
@@ -219,9 +220,10 @@ bool CZMQPublishHashTransactionNotifier::NotifyTransaction(const CTransaction &t
{
uint256 hash = transaction.GetHash();
LogPrint(BCLog::ZMQ, "zmq: Publish hashtx %s to %s\n", hash.GetHex(), this->address);
- char data[32];
- for (unsigned int i = 0; i < 32; i++)
+ uint8_t data[32];
+ for (unsigned int i = 0; i < 32; i++) {
data[31 - i] = hash.begin()[i];
+ }
return SendZmqMessage(MSG_HASHTX, data, 32);
}