chain: make some integer conversions explicit

We have an unsigned constant which we're bit-inverting, or'ing into a
signed constant, then assigning back to the signed constant. We should
make it explicit wth is going on here.
This commit is contained in:
Andrew Poelstra 2025-02-10 23:17:15 +00:00
parent 86d740b5eb
commit f5ed4e4520
No known key found for this signature in database
GPG key ID: C588D63CE41B97C1

View file

@ -469,7 +469,7 @@ public:
bool RemoveDynaFedMaskOnSerialize(bool for_read) {
if (for_read) {
bool is_dyna = nVersion < 0;
nVersion = ~CBlockHeader::DYNAFED_HF_MASK & nVersion;
nVersion = (int32_t) (~CBlockHeader::DYNAFED_HF_MASK & (uint32_t)nVersion);
return is_dyna;
} else {
return is_dynafed_block();