diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-09-17 12:08:53 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-09-17 13:04:54 +0200 |
commit | 69dd8c919aa3a1b88af34265f828fe0a58a55014 (patch) | |
tree | 672551d1afcb67ad45a24450ac753cfbd31d2e1e /src/wallet.cpp | |
parent | 651a1fcf813983e8e5f6f180e062a5111e900dad (diff) | |
parent | 0be990ba34110184c8a5a2c04094311dab5cd84c (diff) |
Merge pull request #4899
0be990b Move CTxDestination from script/script to script/standard (Pieter Wuille)
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r-- | src/wallet.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 611fb8bbcd..6bfaec3681 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -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); |