Skip to content

Commit b668046

Browse files
committed
s/HF_MASK/DYNAFED_HF_MASK/
1 parent 0fd39ed commit b668046

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/chain.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,11 @@ class CDiskBlockIndex : public CBlockIndex
440440
if (ser_action.ForRead()) {
441441
READWRITE(nVersion);
442442
is_dyna = nVersion < 0;
443-
this->nVersion = ~CBlockHeader::HF_MASK & nVersion;
443+
this->nVersion = ~CBlockHeader::DYNAFED_HF_MASK & nVersion;
444444
} else {
445445
nVersion = this->nVersion;
446446
if (!dynafed_params.IsNull()) {
447-
nVersion |= CBlockHeader::HF_MASK;
447+
nVersion |= CBlockHeader::DYNAFED_HF_MASK;
448448
is_dyna = true;
449449
}
450450
READWRITE(nVersion);

src/primitives/block.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class CBlockHeader
194194
}
195195

196196
// HF bit to detect dynamic federation blocks
197-
static const uint32_t HF_MASK = 1 << 31;
197+
static const uint32_t DYNAFED_HF_MASK = 1 << 31;
198198

199199
ADD_SERIALIZE_METHODS;
200200

@@ -209,11 +209,11 @@ class CBlockHeader
209209
if (ser_action.ForRead()) {
210210
READWRITE(nVersion);
211211
is_dyna = nVersion < 0;
212-
this->nVersion = ~HF_MASK & nVersion;
212+
this->nVersion = ~DYNAFED_HF_MASK & nVersion;
213213
} else {
214214
nVersion = this->nVersion;
215215
if (!m_dyna_params.IsNull()) {
216-
nVersion |= HF_MASK;
216+
nVersion |= DYNAFED_HF_MASK;
217217
is_dyna = true;
218218
}
219219
READWRITE(nVersion);

test/functional/test_framework/messages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ def __repr__(self):
925925

926926

927927
HEADER_HF_BIT = 1 << 31
928-
HEADER_HF_MASK = 0x7fffffff
928+
HEADER_DYNAFED_HF_MASK = 0x7fffffff
929929
class CBlockHeader:
930930
__slots__ = ("hash", "hashMerkleRoot", "hashPrevBlock", "nBits", "nNonce",
931931
"nTime", "nVersion", "sha256", "block_height", "proof", "m_dyna_params",
@@ -965,7 +965,7 @@ def deserialize(self, f):
965965

966966
if self.nVersion < 0:
967967
is_dyna = True
968-
self.nVersion = HEADER_HF_MASK & self.nVersion
968+
self.nVersion = HEADER_DYNAFED_HF_MASK & self.nVersion
969969

970970
self.hashPrevBlock = deser_uint256(f)
971971
self.hashMerkleRoot = deser_uint256(f)

0 commit comments

Comments
 (0)