mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 11:29:23 +00:00
More hardfork code
All block format changes must be a part of hardfork
This commit is contained in:
parent
403a39d32f
commit
7293e37165
1 changed files with 9 additions and 3 deletions
|
@ -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)
|
||||
|
||||
if (!merge_mining_enabled()) {
|
||||
READ_BYTE(m_majorVersion);
|
||||
READ_BYTE(m_minorVersion);
|
||||
}
|
||||
else {
|
||||
READ_VARINT(m_majorVersion);
|
||||
if (m_majorVersion > HARDFORK_SUPPORTED_VERSION) return __LINE__;
|
||||
|
||||
READ_VARINT(m_minorVersion);
|
||||
}
|
||||
|
||||
if (m_majorVersion > HARDFORK_SUPPORTED_VERSION) return __LINE__;
|
||||
if (m_minorVersion < m_majorVersion) return __LINE__;
|
||||
|
||||
READ_VARINT(m_timestamp);
|
||||
|
|
Loading…
Reference in a new issue