mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Merge bitcoin/bitcoin#24218: zmq: Fix implicit-integer-sign-change
fa2406a50a
zmq: Fix implicit-integer-sign-change (MarcoFalke) Pull request description: uint256::begin() returns unsigned data, so there is no reason to make it signed. Fix that and remove the sanitizer suppression. ACKs for top commit: hebasto: ACKfa2406a50a
PastaPastaPasta: utACKfa2406a50a
, I have reviewed the code and think it makes sense Tree-SHA512: 150ebcf3fdc3e0f60b6fd8e5fe638737b01e8a0863296bd545fb5ed17d33ab23b2ff94204996aa7b4617650b7383bd86ed2d2bf46746b410feae449de179a2bd
This commit is contained in:
commit
36f8e99d24
2 changed files with 6 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,6 @@ implicit-integer-sign-change:script/bitcoinconsensus.cpp
|
|||
implicit-integer-sign-change:script/interpreter.cpp
|
||||
implicit-integer-sign-change:serialize.h
|
||||
implicit-integer-sign-change:txmempool.cpp
|
||||
implicit-integer-sign-change:zmq/zmqpublishnotifier.cpp
|
||||
implicit-signed-integer-truncation:addrman.cpp
|
||||
implicit-signed-integer-truncation:addrman.h
|
||||
implicit-signed-integer-truncation:crypto/
|
||||
|
|
Loading…
Add table
Reference in a new issue