mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Refactored conf and crypto namespaces.
This commit is contained in:
26
src/main.cpp
26
src/main.cpp
@@ -22,26 +22,28 @@ int main(int argc, char **argv)
|
||||
{
|
||||
cout << _HP_VERSION_ << endl;
|
||||
}
|
||||
else if (conf::ctx.command == "new")
|
||||
{
|
||||
if (conf::create_contract() != 0 || crypto::init() != 0)
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (conf::init() != 0)
|
||||
if (crypto::init() != 0)
|
||||
return -1;
|
||||
|
||||
if (conf::ctx.command == "rekey")
|
||||
if (conf::ctx.command == "new")
|
||||
{
|
||||
//Clear the keys. crpyto::init will init the keys.
|
||||
if (conf::clear_keys() != 0 || crypto::init() != 0)
|
||||
if (conf::create_contract() != 0)
|
||||
return -1;
|
||||
}
|
||||
else if (conf::ctx.command == "run")
|
||||
else
|
||||
{
|
||||
if (crypto::init() != 0 || usr::init() != 0)
|
||||
return -1;
|
||||
if (conf::ctx.command == "rekey")
|
||||
{
|
||||
if (conf::rekey() != 0)
|
||||
return -1;
|
||||
}
|
||||
else if (conf::ctx.command == "run")
|
||||
{
|
||||
if (conf::init() != 0 || usr::init() != 0)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user