mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Basic consensus implementation (#45)
Consensus for user connections, user inputs, contract outputs and time.
This commit is contained in:
10
src/conf.cpp
10
src/conf.cpp
@@ -38,6 +38,14 @@ int init()
|
||||
if (validate_contract_dir_paths() != 0 || load_config() != 0 || validate_config() != 0)
|
||||
return -1;
|
||||
|
||||
// Append self peer to peer list.
|
||||
std::string portstr = std::to_string(cfg.peerport);
|
||||
std::string peerid = "0.0.0.0:" + portstr;
|
||||
cfg.peers.emplace(std::move(peerid), std::make_pair("0.0.0.0", portstr));
|
||||
|
||||
// Append self pubkey to unl list.
|
||||
cfg.unl.emplace(cfg.pubkey);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -457,7 +465,7 @@ int validate_contract_dir_paths()
|
||||
{
|
||||
std::cout << path << " does not exist. Please provide self-signed certificates. Can generate using command\n"
|
||||
<< "openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem\n"
|
||||
<< "and add it to " + ctx.configDir;
|
||||
<< "and add it to " + ctx.configDir << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user