Adding utillity functions and beta genesis keys.

This commit is contained in:
clemahieu 2014-11-30 11:49:52 -06:00
commit 750184c130
2 changed files with 13 additions and 2 deletions

View file

@ -107,6 +107,7 @@ int main (int argc, char * const * argv)
("debug_activity", "Generates fake debug activity")
("profile_work", "Profile the work function")
("generate_key", "Generates a random keypair")
("get_account", boost::program_options::value <std::string> (), "Get base58check encoded account from public key")
("xorshift_profile", "Profile xorshift algorithms")
("verify_profile", "Profile signature verification");
boost::program_options::variables_map vm;
@ -128,7 +129,17 @@ int main (int argc, char * const * argv)
else if (vm.count ("generate_key"))
{
rai::keypair pair;
std::cout << "Private: " << pair.prv.to_string () << " Public: " << pair.pub.to_string () << std::endl;
std::string account;
pair.pub.encode_base58check (account);
std::cout << "Private: " << pair.prv.to_string () << std::endl << "Public: " << pair.pub.to_string () << std::endl << "Account: " << account << std::endl;
}
else if (vm.count ("get_account"))
{
rai::uint256_union pub;
pub.decode_hex (vm ["get_account"].as <std::string> ());
std::string account;
pub.encode_base58check (account);
std::cout << "Account: " << account << std::endl;
}
else if (vm.count ("profile_work"))
{

View file

@ -9,7 +9,7 @@ namespace
{
std::string rai_test_private_key = "34F0A37AAD20F4A260F0A5B3CB3D7FB50673212263E58A380BC10474BB039CE4";
std::string rai_test_public_key = "B241CC17B3684D22F304C7AF063D1B833124F7F1A4DAD07E6DA60D7D8F334911"; // U63Kt3B7yp2iQB4GsVWriGv34kk2qwhT7acKvn8yWZGdNVesJ8
std::string rai_beta_public_key = "0";
std::string rai_beta_public_key = "1A99D99731BC08252C8762FBB2CBB7BA3520039109FCE869C75406E722C636E3"; // TV67A7XWyLF7njTjTZC9zQ4iLftsVDRQUDmW7LieZzqZm2gMnz
std::string rai_live_public_key = "0";
}