Skip to content

Commit

Permalink
Merge pull request #1 from sats0k/master
Browse files Browse the repository at this point in the history
Typographic, Bitcoin to Phoenixcoin
  • Loading branch information
ghostlander committed Feb 26, 2019
2 parents 84ca83d + 5f84dde commit d95d5d6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions src/rpcdump.cpp
Expand Up @@ -36,7 +36,7 @@ Value importprivkey(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"importprivkey <bitcoinprivkey> [label]\n"
"importprivkey <phoenixcoinprivkey> [label]\n"
"Adds a private key (as returned by dumpprivkey) to your wallet.");

string strSecret = params[0].get_str();
Expand Down Expand Up @@ -73,13 +73,13 @@ Value dumpprivkey(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(
"dumpprivkey <bitcoinaddress>\n"
"Reveals the private key corresponding to <bitcoinaddress>.");
"dumpprivkey <phoenixcoinaddress>\n"
"Reveals the private key corresponding to <phoenixcoinaddress>.");

string strAddress = params[0].get_str();
CBitcoinAddress address;
if (!address.SetString(strAddress))
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Phoenixcoin address");
CKeyID keyID;
if (!address.GetKeyID(keyID))
throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to a key");
Expand Down
40 changes: 20 additions & 20 deletions src/rpcwallet.cpp
Expand Up @@ -91,7 +91,7 @@ Value getnewaddress(const Array& params, bool fHelp)
if (fHelp || params.size() > 1)
throw runtime_error(
"getnewaddress [account]\n"
"Returns a new Bitcoin address for receiving payments. "
"Returns a new Phoenixcoin address for receiving payments. "
"If [account] is specified (recommended), it is added to the address book "
"so payments received with the address will be credited to [account].");

Expand Down Expand Up @@ -158,7 +158,7 @@ Value getaccountaddress(const Array& params, bool fHelp)
if (fHelp || params.size() != 1)
throw runtime_error(
"getaccountaddress <account>\n"
"Returns the current Bitcoin address for receiving payments to this account.");
"Returns the current Phoenixcoin address for receiving payments to this account.");

// Parse the account first so we don't generate a key if there's an error
string strAccount = AccountFromValue(params[0]);
Expand All @@ -176,12 +176,12 @@ Value setaccount(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"setaccount <bitcoinaddress> <account>\n"
"setaccount <phoenixcoinaddress> <account>\n"
"Sets the account associated with the given address.");

CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Phoenixcoin address");


string strAccount;
Expand All @@ -206,12 +206,12 @@ Value getaccount(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(
"getaccount <bitcoinaddress>\n"
"getaccount <phoenixcoinaddress>\n"
"Returns the account associated with the given address.");

CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Phoenixcoin address");

string strAccount;
map<CTxDestination, string>::iterator mi = pwalletMain->mapAddressBook.find(address.Get());
Expand Down Expand Up @@ -246,13 +246,13 @@ Value sendtoaddress(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 2 || params.size() > 4)
throw runtime_error(
"sendtoaddress <bitcoinaddress> <amount> [comment] [comment-to]\n"
"sendtoaddress <phoenixcoinaddress> <amount> [comment] [comment-to]\n"
"<amount> is a real and is rounded to the nearest 0.00000001"
+ HelpRequiringPassphrase());

CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Phoenicoin address");

// Amount
int64 nAmount = AmountFromValue(params[1]);
Expand Down Expand Up @@ -309,7 +309,7 @@ Value signmessage(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 2)
throw runtime_error(
"signmessage <bitcoinaddress> <message>\n"
"signmessage <phoenixcoinaddress> <message>\n"
"Sign a message with the private key of an address");

EnsureWalletIsUnlocked();
Expand Down Expand Up @@ -344,7 +344,7 @@ Value verifymessage(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 3)
throw runtime_error(
"verifymessage <bitcoinaddress> <signature> <message>\n"
"verifymessage <phoenixcoinaddress> <signature> <message>\n"
"Verify a signed message");

string strAddress = params[0].get_str();
Expand Down Expand Up @@ -381,14 +381,14 @@ Value getreceivedbyaddress(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
"getreceivedbyaddress <bitcoinaddress> [minconf=1]\n"
"Returns the total amount received by <bitcoinaddress> in transactions with at least [minconf] confirmations.");
"getreceivedbyaddress <phoenixcoinaddress> [minconf=1]\n"
"Returns the total amount received by <phoenixcoinaddress> in transactions with at least [minconf] confirmations.");

// Bitcoin address
CBitcoinAddress address = CBitcoinAddress(params[0].get_str());
CScript scriptPubKey;
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Phoenixcoin address");
scriptPubKey.SetDestination(address.Get());
if (!IsMine(*pwalletMain,scriptPubKey))
return (double)0.0;
Expand Down Expand Up @@ -602,14 +602,14 @@ Value sendfrom(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 3 || params.size() > 6)
throw runtime_error(
"sendfrom <fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]\n"
"sendfrom <fromaccount> <tophoenixcoinaddress> <amount> [minconf=1] [comment] [comment-to]\n"
"<amount> is a real and is rounded to the nearest 0.00000001"
+ HelpRequiringPassphrase());

string strAccount = AccountFromValue(params[0]);
CBitcoinAddress address(params[1].get_str());
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Phoenixcoin address");
int64 nAmount = AmountFromValue(params[2]);
int nMinDepth = 1;
if (params.size() > 3)
Expand Down Expand Up @@ -665,7 +665,7 @@ Value sendmany(const Array& params, bool fHelp)
{
CBitcoinAddress address(s.name_);
if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Bitcoin address: ")+s.name_);
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Phoenixcoin address: ")+s.name_);

if (setAddress.count(address))
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_);
Expand Down Expand Up @@ -708,7 +708,7 @@ Value addmultisigaddress(const Array& params, bool fHelp)
{
string msg = "addmultisigaddress <nrequired> <'[\"key\",\"key\"]'> [account]\n"
"Add a nrequired-to-sign multisignature address to the wallet\"\n"
"each key is a Bitcoin address or hex-encoded public key\n"
"each key is a Phoenixcoin address or hex-encoded public key\n"
"If [account] is specified, assign address to [account].";
throw runtime_error(msg);
}
Expand Down Expand Up @@ -1397,7 +1397,7 @@ Value encryptwallet(const Array& params, bool fHelp)
// slack space in .dat files; that is bad if the old data is
// unencrypted private keys. So:
StartShutdown();
return "wallet encrypted; Bitcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.";
return "wallet encrypted; Phoenixcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.";
}

class DescribeAddressVisitor : public boost::static_visitor<Object>
Expand Down Expand Up @@ -1439,8 +1439,8 @@ Value validateaddress(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(
"validateaddress <bitcoinaddress>\n"
"Return information about <bitcoinaddress>.");
"validateaddress <phoenixcoinaddress>\n"
"Return information about <phoenixcoinaddress>.");

CBitcoinAddress address(params[0].get_str());
bool isValid = address.IsValid();
Expand Down

0 comments on commit d95d5d6

Please sign in to comment.