Skip to content

Commit

Permalink
2.1.3-1255
Browse files Browse the repository at this point in the history
  • Loading branch information
servc4 committed Apr 23, 2018
1 parent b5b05ce commit eda0fb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CryptoNoteCore/CachedBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ const Crypto::Hash& CachedBlock::getBlockLongHash(cn_context& cryptoContext) con
const auto& rawHashingBlock = getParentBlockHashingBinaryArray(true);
blockLongHash = Hash();
cn_slow_hash(cryptoContext, rawHashingBlock.data(), rawHashingBlock.size(), blockLongHash.get());
} else if (block.majorVersion >= BLOCK_MAJOR_VERSION_4) {
const auto& rawHashingBlock = getParentBlockHashingBinaryArray(true);
blockLongHash = Hash();
cn_slow_hash(cryptoContext, rawHashingBlock.data(), rawHashingBlock.size(), blockLongHash.get());
} else {
throw std::runtime_error("Unknown block major version.");
}
Expand Down
1 change: 1 addition & 0 deletions src/CryptoNoteCore/DatabaseBlockchainCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,7 @@ uint8_t DatabaseBlockchainCache::getBlockMajorVersionForHeight(uint32_t height)
UpgradeManager upgradeManager;
upgradeManager.addMajorBlockVersion(BLOCK_MAJOR_VERSION_2, currency.upgradeHeight(BLOCK_MAJOR_VERSION_2));
upgradeManager.addMajorBlockVersion(BLOCK_MAJOR_VERSION_3, currency.upgradeHeight(BLOCK_MAJOR_VERSION_3));
upgradeManager.addMajorBlockVersion(BLOCK_MAJOR_VERSION_4, currency.upgradeHeight(BLOCK_MAJOR_VERSION_4));
return upgradeManager.getBlockMajorVersion(height);
}

Expand Down

0 comments on commit eda0fb2

Please sign in to comment.