mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge pull request #129 from jtimon/0.13.1-elements-fixup-sendmoney
Trivial: Move SendMoney wrapper below funcion definition
This commit is contained in:
commit
160c4a13e9
1 changed files with 5 additions and 6 deletions
|
|
@ -344,12 +344,6 @@ UniValue getaddressesbyaccount(const UniValue& params, bool fHelp)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void SendMoney(const CScript& scriptPubKey, CAmount nValue, bool fSubtractFeeFromAmount, const CPubKey &confidentiality_key, CWalletTx& wtxNew);
|
||||
static void SendMoney(const CTxDestination &address, CAmount nValue, bool fSubtractFeeFromAmount, const CPubKey &confidentiality_key, CWalletTx& wtxNew)
|
||||
{
|
||||
SendMoney(GetScriptForDestination(address), nValue, fSubtractFeeFromAmount, confidentiality_key, wtxNew);
|
||||
}
|
||||
|
||||
static void SendMoney(const CScript& scriptPubKey, CAmount nValue, bool fSubtractFeeFromAmount, const CPubKey &confidentiality_key, CWalletTx& wtxNew)
|
||||
{
|
||||
CAmount curBalance = pwalletMain->GetBalance();
|
||||
|
|
@ -378,6 +372,11 @@ static void SendMoney(const CScript& scriptPubKey, CAmount nValue, bool fSubtrac
|
|||
throw JSONRPCError(RPC_WALLET_ERROR, "Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of the wallet and coins were spent in the copy but not marked as spent here.");
|
||||
}
|
||||
|
||||
static void SendMoney(const CTxDestination &address, CAmount nValue, bool fSubtractFeeFromAmount, const CPubKey &confidentiality_key, CWalletTx& wtxNew)
|
||||
{
|
||||
SendMoney(GetScriptForDestination(address), nValue, fSubtractFeeFromAmount, confidentiality_key, wtxNew);
|
||||
}
|
||||
|
||||
UniValue sendtoaddress(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if (!EnsureWalletIsAvailable(fHelp))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue