if (fHelp || params.size() != 0)
throw runtime_error(
"stop\n"
- "Stop bitcoin server.");
+ "Stop ppcoin server.");
#ifndef QT_GUI
// Shutdown will take long enough that the response should get back
CreateThread(Shutdown, NULL);
- return "bitcoin server stopping";
+ return "ppcoin server stopping";
#else
throw runtime_error("NYI: cannot shut down GUI with RPC command");
#endif
if (fHelp || params.size() > 1)
throw runtime_error(
"getnewaddress [account]\n"
- "Returns a new bitcoin address for receiving payments. "
+ "Returns a new ppcoin 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].");
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 ppcoin 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]);
{
if (fHelp || params.size() < 1 || params.size() > 2)
throw runtime_error(
- "setaccount <bitcoinaddress> <account>\n"
+ "setaccount <ppcoinaddress> <account>\n"
"Sets the account associated with the given address.");
CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
- throw JSONRPCError(-5, "Invalid bitcoin address");
+ throw JSONRPCError(-5, "Invalid ppcoin address");
string strAccount;
{
if (fHelp || params.size() != 1)
throw runtime_error(
- "getaccount <bitcoinaddress>\n"
+ "getaccount <ppcoinaddress>\n"
"Returns the account associated with the given address.");
CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
- throw JSONRPCError(-5, "Invalid bitcoin address");
+ throw JSONRPCError(-5, "Invalid ppcoin address");
string strAccount;
map<CBitcoinAddress, string>::iterator mi = pwalletMain->mapAddressBook.find(address);
{
if (pwalletMain->IsCrypted() && (fHelp || params.size() < 2 || params.size() > 4))
throw runtime_error(
- "sendtoaddress <bitcoinaddress> <amount> [comment] [comment-to]\n"
- "<amount> is a real and is rounded to the nearest 0.00000001\n"
+ "sendtoaddress <ppcoinaddress> <amount> [comment] [comment-to]\n"
+ "<amount> is a real and is rounded to the nearest 0.0001\n"
"requires wallet passphrase to be set with walletpassphrase first");
if (!pwalletMain->IsCrypted() && (fHelp || params.size() < 2 || params.size() > 4))
throw runtime_error(
- "sendtoaddress <bitcoinaddress> <amount> [comment] [comment-to]\n"
- "<amount> is a real and is rounded to the nearest 0.00000001");
+ "sendtoaddress <ppcoinaddress> <amount> [comment] [comment-to]\n"
+ "<amount> is a real and is rounded to the nearest 0.0001");
CBitcoinAddress address(params[0].get_str());
if (!address.IsValid())
- throw JSONRPCError(-5, "Invalid bitcoin address");
+ throw JSONRPCError(-5, "Invalid ppcoin address");
// Amount
int64 nAmount = AmountFromValue(params[1]);
{
if (fHelp || params.size() != 2)
throw runtime_error(
- "signmessage <bitcoinaddress> <message>\n"
+ "signmessage <ppcoinaddress> <message>\n"
"Sign a message with the private key of an address");
if (pwalletMain->IsLocked())
{
if (fHelp || params.size() != 3)
throw runtime_error(
- "verifymessage <bitcoinaddress> <signature> <message>\n"
+ "verifymessage <ppcoinaddress> <signature> <message>\n"
"Verify a signed message");
string strAddress = params[0].get_str();
{
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 <ppcoinaddress> [minconf=1]\n"
+ "Returns the total amount received by <ppcoinaddress> in transactions with at least [minconf] confirmations.");
// Bitcoin address
CBitcoinAddress address = CBitcoinAddress(params[0].get_str());
CScript scriptPubKey;
if (!address.IsValid())
- throw JSONRPCError(-5, "Invalid bitcoin address");
+ throw JSONRPCError(-5, "Invalid ppcoin address");
scriptPubKey.SetBitcoinAddress(address);
if (!IsMine(*pwalletMain,scriptPubKey))
return (double)0.0;
{
if (pwalletMain->IsCrypted() && (fHelp || params.size() < 3 || params.size() > 6))
throw runtime_error(
- "sendfrom <fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]\n"
- "<amount> is a real and is rounded to the nearest 0.00000001\n"
+ "sendfrom <fromaccount> <toppcoinaddress> <amount> [minconf=1] [comment] [comment-to]\n"
+ "<amount> is a real and is rounded to the nearest 0.0001\n"
"requires wallet passphrase to be set with walletpassphrase first");
if (!pwalletMain->IsCrypted() && (fHelp || params.size() < 3 || params.size() > 6))
throw runtime_error(
- "sendfrom <fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]\n"
- "<amount> is a real and is rounded to the nearest 0.00000001");
+ "sendfrom <fromaccount> <toppcoinaddress> <amount> [minconf=1] [comment] [comment-to]\n"
+ "<amount> is a real and is rounded to the nearest 0.0001");
string strAccount = AccountFromValue(params[0]);
CBitcoinAddress address(params[1].get_str());
if (!address.IsValid())
- throw JSONRPCError(-5, "Invalid bitcoin address");
+ throw JSONRPCError(-5, "Invalid ppcoin address");
int64 nAmount = AmountFromValue(params[2]);
int nMinDepth = 1;
if (params.size() > 3)
{
CBitcoinAddress address(s.name_);
if (!address.IsValid())
- throw JSONRPCError(-5, string("Invalid bitcoin address:")+s.name_);
+ throw JSONRPCError(-5, string("Invalid ppcoin address:")+s.name_);
if (setAddress.count(address))
throw JSONRPCError(-8, string("Invalid parameter, duplicated address: ")+s.name_);
// slack space in .dat files; that is bad if the old data is
// unencrypted private keys. So:
CreateThread(Shutdown, NULL);
- return "wallet encrypted; bitcoin server stopping, restart to run with encrypted wallet";
+ return "wallet encrypted; ppcoin server stopping, restart to run with encrypted wallet";
}
{
if (fHelp || params.size() != 1)
throw runtime_error(
- "validateaddress <bitcoinaddress>\n"
- "Return information about <bitcoinaddress>.");
+ "validateaddress <ppcoinaddress>\n"
+ "Return information about <ppcoinaddress>.");
CBitcoinAddress address(params[0].get_str());
bool isValid = address.IsValid();
"If [data] is specified, tries to solve the block and returns true if it was successful.");
if (vNodes.empty())
- throw JSONRPCError(-9, "Bitcoin is not connected!");
+ throw JSONRPCError(-9, "PPCoin is not connected!");
if (IsInitialBlockDownload())
- throw JSONRPCError(-10, "Bitcoin is downloading blocks...");
+ throw JSONRPCError(-10, "PPCoin is downloading blocks...");
typedef map<uint256, pair<CBlock*, CScript> > mapNewBlock_t;
static mapNewBlock_t mapNewBlock;
if (params.size() == 0)
{
if (vNodes.empty())
- throw JSONRPCError(-9, "Bitcoin is not connected!");
+ throw JSONRPCError(-9, "PPCoin is not connected!");
if (IsInitialBlockDownload())
- throw JSONRPCError(-10, "Bitcoin is downloading blocks...");
+ throw JSONRPCError(-10, "PPCoin is downloading blocks...");
static CReserveKey reservekey(pwalletMain);
{
ostringstream s;
s << "POST / HTTP/1.1\r\n"
- << "User-Agent: bitcoin-json-rpc/" << FormatFullVersion() << "\r\n"
+ << "User-Agent: ppcoin-json-rpc/" << FormatFullVersion() << "\r\n"
<< "Host: 127.0.0.1\r\n"
<< "Content-Type: application/json\r\n"
<< "Content-Length: " << strMsg.size() << "\r\n"
if (nStatus == 401)
return strprintf("HTTP/1.0 401 Authorization Required\r\n"
"Date: %s\r\n"
- "Server: bitcoin-json-rpc/%s\r\n"
+ "Server: ppcoin-json-rpc/%s\r\n"
"WWW-Authenticate: Basic realm=\"jsonrpc\"\r\n"
"Content-Type: text/html\r\n"
"Content-Length: 296\r\n"
"Connection: close\r\n"
"Content-Length: %d\r\n"
"Content-Type: application/json\r\n"
- "Server: bitcoin-json-rpc/%s\r\n"
+ "Server: ppcoin-json-rpc/%s\r\n"
"\r\n"
"%s",
nStatus,
strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
if (strRPCUserColonPass == ":")
{
- string strWhatAmI = "To use bitcoind";
+ string strWhatAmI = "To use ppcoind";
if (mapArgs.count("-server"))
strWhatAmI = strprintf(_("To use the %s option"), "\"-server\"");
else if (mapArgs.count("-daemon"))
}
#else
if (fUseSSL)
- throw runtime_error("-rpcssl=1, but bitcoin compiled without full openssl libraries.");
+ throw runtime_error("-rpcssl=1, but ppcoin compiled without full openssl libraries.");
#endif
loop
throw runtime_error("couldn't connect to server");
#else
if (fUseSSL)
- throw runtime_error("-rpcssl=1, but bitcoin compiled without full openssl libraries.");
+ throw runtime_error("-rpcssl=1, but ppcoin compiled without full openssl libraries.");
ip::tcp::iostream stream(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", CBigNum(RPC_PORT).ToString().c_str()));
if (stream.fail())