Move CTxDestination from script/script to script/standard

This commit is contained in:
Pieter Wuille
2014-09-11 19:15:29 +02:00
parent ab3834baae
commit 0be990ba34
22 changed files with 122 additions and 122 deletions

View File

@@ -1385,7 +1385,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
// coin control: send change to custom address
if (coinControl && !boost::get<CNoDestination>(&coinControl->destChange))
scriptChange.SetDestination(coinControl->destChange);
scriptChange = GetScriptForDestination(coinControl->destChange);
// no coin control: send change to newly generated address
else
@@ -1403,7 +1403,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
ret = reservekey.GetReservedKey(vchPubKey);
assert(ret); // should never fail, as we just unlocked
scriptChange.SetDestination(vchPubKey.GetID());
scriptChange = GetScriptForDestination(vchPubKey.GetID());
}
CTxOut newTxOut(nChange, scriptChange);
@@ -1556,8 +1556,7 @@ string CWallet::SendMoney(const CTxDestination &address, int64_t nValue, CWallet
}
// Parse Bitcoin address
CScript scriptPubKey;
scriptPubKey.SetDestination(address);
CScript scriptPubKey = GetScriptForDestination(address);
// Create and send the transaction
CReserveKey reservekey(this);