s/HF_MASK/DYNAFED_HF_MASK/

This commit is contained in:
Gregory Sanders 2019-06-14 13:08:57 -04:00
parent 5e2aca1b9d
commit 1d1cf23fd2
3 changed files with 7 additions and 7 deletions

View file

@ -440,11 +440,11 @@ public:
if (ser_action.ForRead()) { if (ser_action.ForRead()) {
READWRITE(nVersion); READWRITE(nVersion);
is_dyna = nVersion < 0; is_dyna = nVersion < 0;
this->nVersion = ~CBlockHeader::HF_MASK & nVersion; this->nVersion = ~CBlockHeader::DYNAFED_HF_MASK & nVersion;
} else { } else {
nVersion = this->nVersion; nVersion = this->nVersion;
if (!dynafed_params.IsNull()) { if (!dynafed_params.IsNull()) {
nVersion |= CBlockHeader::HF_MASK; nVersion |= CBlockHeader::DYNAFED_HF_MASK;
is_dyna = true; is_dyna = true;
} }
READWRITE(nVersion); READWRITE(nVersion);

View file

@ -194,7 +194,7 @@ public:
} }
// HF bit to detect dynamic federation blocks // HF bit to detect dynamic federation blocks
static const uint32_t HF_MASK = 1 << 31; static const uint32_t DYNAFED_HF_MASK = 1 << 31;
ADD_SERIALIZE_METHODS; ADD_SERIALIZE_METHODS;
@ -209,11 +209,11 @@ public:
if (ser_action.ForRead()) { if (ser_action.ForRead()) {
READWRITE(nVersion); READWRITE(nVersion);
is_dyna = nVersion < 0; is_dyna = nVersion < 0;
this->nVersion = ~HF_MASK & nVersion; this->nVersion = ~DYNAFED_HF_MASK & nVersion;
} else { } else {
nVersion = this->nVersion; nVersion = this->nVersion;
if (!m_dyna_params.IsNull()) { if (!m_dyna_params.IsNull()) {
nVersion |= HF_MASK; nVersion |= DYNAFED_HF_MASK;
is_dyna = true; is_dyna = true;
} }
READWRITE(nVersion); READWRITE(nVersion);

View file

@ -925,7 +925,7 @@ class DynaFedParams:
HEADER_HF_BIT = 1 << 31 HEADER_HF_BIT = 1 << 31
HEADER_HF_MASK = 0x7fffffff HEADER_DYNAFED_HF_MASK = 0x7fffffff
class CBlockHeader: class CBlockHeader:
__slots__ = ("hash", "hashMerkleRoot", "hashPrevBlock", "nBits", "nNonce", __slots__ = ("hash", "hashMerkleRoot", "hashPrevBlock", "nBits", "nNonce",
"nTime", "nVersion", "sha256", "block_height", "proof", "m_dyna_params", "nTime", "nVersion", "sha256", "block_height", "proof", "m_dyna_params",
@ -965,7 +965,7 @@ class CBlockHeader:
if self.nVersion < 0: if self.nVersion < 0:
is_dyna = True is_dyna = True
self.nVersion = HEADER_HF_MASK & self.nVersion self.nVersion = HEADER_DYNAFED_HF_MASK & self.nVersion
self.hashPrevBlock = deser_uint256(f) self.hashPrevBlock = deser_uint256(f)
self.hashMerkleRoot = deser_uint256(f) self.hashMerkleRoot = deser_uint256(f)