mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Move CTxDestination from script/script to script/standard
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user