mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Move CTxDestination from script/script to script/standard
This commit is contained in:
parent
ab3834baae
commit
0be990ba34
22 changed files with 122 additions and 122 deletions
|
|
@ -124,8 +124,7 @@ CBitcoinAddress GetAccountAddress(string strAccount, bool bForceNew=false)
|
|||
// Check if the current key has been used
|
||||
if (account.vchPubKey.IsValid())
|
||||
{
|
||||
CScript scriptPubKey;
|
||||
scriptPubKey.SetDestination(account.vchPubKey.GetID());
|
||||
CScript scriptPubKey = GetScriptForDestination(account.vchPubKey.GetID());
|
||||
for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin();
|
||||
it != pwalletMain->mapWallet.end() && account.vchPubKey.IsValid();
|
||||
++it)
|
||||
|
|
@ -472,10 +471,9 @@ Value getreceivedbyaddress(const Array& params, bool fHelp)
|
|||
|
||||
// Bitcoin address
|
||||
CBitcoinAddress address = CBitcoinAddress(params[0].get_str());
|
||||
CScript scriptPubKey;
|
||||
if (!address.IsValid())
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
|
||||
scriptPubKey.SetDestination(address.Get());
|
||||
CScript scriptPubKey = GetScriptForDestination(address.Get());
|
||||
if (!IsMine(*pwalletMain,scriptPubKey))
|
||||
return (double)0.0;
|
||||
|
||||
|
|
@ -849,8 +847,7 @@ Value sendmany(const Array& params, bool fHelp)
|
|||
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_);
|
||||
setAddress.insert(address);
|
||||
|
||||
CScript scriptPubKey;
|
||||
scriptPubKey.SetDestination(address.Get());
|
||||
CScript scriptPubKey = GetScriptForDestination(address.Get());
|
||||
int64_t nAmount = AmountFromValue(s.value_);
|
||||
totalAmount += nAmount;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue