diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index a8296b574e..b019ac3bb6 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2735,16 +2735,18 @@ CScriptID calculate_contract(const CScript& federationRedeemScript, const CBitco return CScriptID(scriptDestination); } -UniValue getfundingaddress(const UniValue& params, bool fHelp) +UniValue getpeginaddress(const UniValue& params, bool fHelp) { if (!EnsureWalletIsAvailable(fHelp)) return NullUniValue; if (fHelp || params.size() > 1) throw runtime_error( - "getfundingaddress ( \"account\" )\n" - "\nReturns information necessary to complete withdraw steps to alpha sidechain.\n" + "getpeginaddress ( \"account\" )\n" + "\nReturns information needed for claimpegin to move coins to the sidechain.\n" "The user should send coins from their Bitcoin wallet to the mainaddress returned.\n" + "IMPORTANT: Like getaddress, getpeginaddress adds new secrets to wallet.dat, necessitating backup on a regular basis.\n" + "\nArguments:\n" "1. \"account\" (string, optional) The account name for the address to be linked to. if not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.\n" "\nResult:\n" @@ -2752,10 +2754,10 @@ UniValue getfundingaddress(const UniValue& params, bool fHelp) "\"mainaddress\" (string) Mainchain Deposit Address\n" "\"address\" (string) The newly created address to which coins will be sent on the sidechain\n" "\nExamples:\n" - + HelpExampleCli("getfundingaddress", "") - + HelpExampleCli("getfundingaddress", "\"\"") - + HelpExampleCli("getfundingaddress", "\"myaccount\"") - + HelpExampleRpc("getfundingaddress", "\"myaccount\"") + + HelpExampleCli("getpeginaddress", "") + + HelpExampleCli("getpeginaddress", "\"\"") + + HelpExampleCli("getpeginaddress", "\"myaccount\"") + + HelpExampleRpc("getpeginaddress", "\"myaccount\"") ); //Creates new address for later receipt of final funds in spendclaim @@ -2859,9 +2861,9 @@ UniValue claimpegin(const UniValue& params, bool fHelp) "Note that the transaction will not be mined or relayed unless it is buried at least 10 blocks deep.\n" "If a transaction is not relayed it may require manual addition to a functionary mempool in order for it to be mined.\n" "\nArguments:\n" - "1. \"sidechainaddress\" (string, required) The sidechain address address generated by getfundingaddress\n" - "2. \"nonce\" (string, required) The nonce generated by getfundingaddress\n" - "3. \"bitcoinTx\" (string, required) The raw bitcoin transaction (in hex) depositing bitcoin to the mainaddress generated by getfundingaddress\n" + "1. \"sidechainaddress\" (string, required) The sidechain address address generated by getpeginaddress\n" + "2. \"nonce\" (string, required) The nonce generated by getpeginaddress\n" + "3. \"bitcoinTx\" (string, required) The raw bitcoin transaction (in hex) depositing bitcoin to the mainaddress generated by getpeginaddress\n" "4. \"txoutproof\" (string, required) A rawtxoutproof (in hex) generated by bitcoind's `gettxoutproof` containing a proof of only bitcoinTx\n" "\nResult:\n" "\"txid\" (string) Txid of the resulting sidechain transaction\n" @@ -2911,7 +2913,7 @@ UniValue claimpegin(const UniValue& params, bool fHelp) if (txBTC.vout[nOut].scriptPubKey == mainchain_script) break; if (nOut == txBTC.vout.size()) - throw JSONRPCError(RPC_INVALID_PARAMETER, "Failed to find output in bitcoinTx to the mainaddress from getfundingaddress"); + throw JSONRPCError(RPC_INVALID_PARAMETER, "Failed to find output in bitcoinTx to the mainaddress from getpeginaddress"); CAmount value = txBTC.vout[nOut].nValue.GetAmount(); //Output we're re-locking @@ -3004,8 +3006,8 @@ static const CRPCCommand commands[] = { "wallet", "getaccount", &getaccount, true }, { "wallet", "getaddressesbyaccount", &getaddressesbyaccount, true }, { "wallet", "getbalance", &getbalance, false }, - { "wallet", "getfundingaddress", &getfundingaddress, false }, { "wallet", "getnewaddress", &getnewaddress, true }, + { "wallet", "getpeginaddress", &getpeginaddress, false }, { "wallet", "getrawchangeaddress", &getrawchangeaddress, true }, { "wallet", "getreceivedbyaccount", &getreceivedbyaccount, false }, { "wallet", "getreceivedbyaddress", &getreceivedbyaddress, false },