More hardfork code

All block format changes must be a part of hardfork
This commit is contained in:
SChernykh 2024-06-03 10:59:57 +02:00
parent 403a39d32f
commit 7293e37165

View file

@ -61,10 +61,16 @@ int PoolBlock::deserialize(const uint8_t* data, size_t size, const SideChain& si
#define READ_BUF(buf, size) do { if (!read_buf((buf), (size))) return __LINE__; } while(0) #define READ_BUF(buf, size) do { if (!read_buf((buf), (size))) return __LINE__; } while(0)
READ_VARINT(m_majorVersion); if (!merge_mining_enabled()) {
if (m_majorVersion > HARDFORK_SUPPORTED_VERSION) return __LINE__; READ_BYTE(m_majorVersion);
READ_BYTE(m_minorVersion);
}
else {
READ_VARINT(m_majorVersion);
READ_VARINT(m_minorVersion);
}
READ_VARINT(m_minorVersion); if (m_majorVersion > HARDFORK_SUPPORTED_VERSION) return __LINE__;
if (m_minorVersion < m_majorVersion) return __LINE__; if (m_minorVersion < m_majorVersion) return __LINE__;
READ_VARINT(m_timestamp); READ_VARINT(m_timestamp);