Skip to content

Commit

Permalink
#1702 added param validation
Browse files Browse the repository at this point in the history
  • Loading branch information
kladkogex committed Nov 6, 2023
1 parent aa4c0d8 commit 95215c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libethereum/ChainParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ ChainParams ChainParams::loadConfig(
u256 id = groupNodeConfObj.at(1).get_uint64();
std::string publicKey = groupNodeConfObj.at(2).get_str();
std::string address = groupNodeConfObj.at(3).get_str();
if (publicKey.empty()) {
BOOST_THROW_EXCEPTION(std::runtime_error("Empty public key in config"));
}
if (address.empty()) {
BOOST_THROW_EXCEPTION(std::runtime_error("Empty address in config"));
}
groupNodes.push_back( { id, sChainIndex, publicKey, address } );
}
std::sort( groupNodes.begin(), groupNodes.end(),
Expand Down

0 comments on commit 95215c7

Please sign in to comment.