hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
irohad.cpp File Reference
#include <csignal>
#include <fstream>
#include <thread>
#include <gflags/gflags.h>
#include <grpc++/grpc++.h>
#include "ametsuchi/storage.hpp"
#include "common/result.hpp"
#include "crypto/keys_manager_impl.hpp"
#include "main/application.hpp"
#include "main/iroha_conf_loader.hpp"
#include "main/raw_block_loader.hpp"
Include dependency graph for irohad.cpp:

Functions

bool validate_config (const char *flag_name, std::string const &path)
 
bool validate_keypair_name (const char *flag_name, std::string const &path)
 
 DEFINE_string (config,"","Specify iroha provisioning path.")
 
 DEFINE_validator (config,&validate_config)
 
 DEFINE_string (genesis_block,"","Specify file with initial block")
 
 DEFINE_string (keypair_name,"","Specify name of .pub and .priv files")
 
 DEFINE_validator (keypair_name,&validate_keypair_name)
 
 DEFINE_bool (overwrite_ledger, false,"Overwrite ledger data if existing")
 
static bool validateVerbosity (const char *flagname, int32_t val)
 
 DEFINE_int32 (verbosity, spdlog::level::info,"Log verbosity")
 Verbosity flag for spdlog configuration. More...
 
 DEFINE_validator (verbosity, validateVerbosity)
 
int main (int argc, char *argv[])
 

Variables

static const std::string kListenIp = "0.0.0.0"
 
std::promise< void > exit_requested
 

Function Documentation

DEFINE_bool ( overwrite_ledger  ,
false  ,
"Overwrite ledger data if existing"   
)

Creating boolean flag for overwriting already existing block storage

Here is the caller graph for this function:

DEFINE_int32 ( verbosity  ,
spdlog::level::info  ,
"Log verbosity"   
)

Verbosity flag for spdlog configuration.

Here is the caller graph for this function:

DEFINE_string ( config  ,
""  ,
"Specify iroha provisioning path."   
)

Creating input argument for the configuration file location.

Here is the caller graph for this function:

DEFINE_string ( genesis_block  ,
""  ,
"Specify file with initial block"   
)

Creating input argument for the genesis block file location.

DEFINE_string ( keypair_name  ,
""  ,
"Specify name of .pub and .priv files"   
)

Creating input argument for the keypair files location.

DEFINE_validator ( config  ,
validate_config 
)

Registering validator for the configuration file location.

Here is the caller graph for this function:

DEFINE_validator ( keypair_name  ,
validate_keypair_name 
)

Registering validator for the keypair files location.

DEFINE_validator ( verbosity  ,
validateVerbosity   
)
int main ( int  argc,
char *  argv[] 
)

if there are any blocks in blockstore, then true

genesis block file is specified as launch parameter

overwrite ledger flag was set as launch parameter

Here is the call graph for this function:

Here is the caller graph for this function:

bool validate_config ( const char *  flag_name,
std::string const &  path 
)

Gflag validator. Validator for the configuration file path input argument. Path is considered to be valid if it is not empty.

Parameters
flag_name- flag name. Must be 'config' in this case
path- file name. Should be path to the config file
Returns
true if argument is valid

Here is the caller graph for this function:

bool validate_keypair_name ( const char *  flag_name,
std::string const &  path 
)

Gflag validator. Validator for the keypair files path input argument. Path is considered to be valid if it is not empty.

Parameters
flag_name- flag name. Must be 'keypair_name' in this case
path- file name. Should be path to the keypair files
Returns
true if argument is valid

Here is the call graph for this function:

static bool validateVerbosity ( const char *  flagname,
int32_t  val 
)
static

Here is the call graph for this function:

Variable Documentation

std::promise<void> exit_requested
const std::string kListenIp = "0.0.0.0"
static

Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0