Skip to content

Commit

Permalink
Merge pull request #2679 from Taraxa-project/fix-terminate-on-genesis
Browse files Browse the repository at this point in the history
chore: terminate on wrong genesis
  • Loading branch information
MatusKysel authored Jan 26, 2024
2 parents 2baad7f + 436cc79 commit 357ede0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.20)
# Set current version of the project
set(TARAXA_MAJOR_VERSION 1)
set(TARAXA_MINOR_VERSION 6)
set(TARAXA_PATCH_VERSION 0)
set(TARAXA_PATCH_VERSION 1)
set(TARAXA_VERSION ${TARAXA_MAJOR_VERSION}.${TARAXA_MINOR_VERSION}.${TARAXA_PATCH_VERSION})

# Any time a change in the network protocol is introduced this version should be increased
Expand Down
4 changes: 2 additions & 2 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ will build out of the box without further effort:
sudo apt install solc

# Install conan package manager
sudo python3 -m pip install conan==1.59.0
sudo python3 -m pip install conan==1.60.0

# Setup clang as default compiler either in your IDE or by env. variables"
export CC="clang-14"
Expand Down Expand Up @@ -94,7 +94,7 @@ will build out of the box without further effort:

# Install conan package manager
# >= 1.36.0 version is required to work properly with clang-14
sudo python3 -m pip install conan==1.59.0
sudo python3 -m pip install conan==1.60.0

# Install cmake
# >= 3.20 version is required for JSON subcommand
Expand Down
4 changes: 2 additions & 2 deletions libraries/core_libs/node/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ void FullNode::init() {
auto genesis_hash_from_db = db_->getGenesisHash();
if (!genesis_hash_from_db.has_value()) {
LOG(log_er_) << "Genesis hash was not found in DB. Something is wrong";
assert(false);
std::terminate();
}
if (genesis_hash != genesis_hash_from_db) {
LOG(log_er_) << "Genesis hash " << genesis_hash << " is different with "
<< (genesis_hash_from_db.has_value() ? *genesis_hash_from_db : h256(0)) << " in DB";
assert(false);
std::terminate();
}

pbft_chain_ = std::make_shared<PbftChain>(node_addr, db_);
Expand Down

0 comments on commit 357ede0

Please sign in to comment.