@@ -1833,7 +1833,7 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount &nFeeRet, int& nC
18331833
18341834 CReserveKey reservekey (this );
18351835 CWalletTx wtx;
1836- if (!CreateTransaction (vecSend, wtx, reservekey, nFeeRet, nChangePosRet, strFailReason, &coinControl, false ))
1836+ if (!CreateTransaction (vecSend, wtx, reservekey, nFeeRet, nChangePosRet, strFailReason, &coinControl, CREATE_TX_DONT_SIGN ))
18371837 return false ;
18381838
18391839 if (nChangePosRet != -1 )
@@ -1859,7 +1859,7 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount &nFeeRet, int& nC
18591859}
18601860
18611861bool CWallet::CreateTransaction (const vector<CRecipient>& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet,
1862- int & nChangePosRet, std::string& strFailReason, const CCoinControl* coinControl, bool sign )
1862+ int & nChangePosRet, std::string& strFailReason, const CCoinControl* coinControl, unsigned int flags )
18631863{
18641864 CAmount nValue = 0 ;
18651865 unsigned int nSubtractFeeFromAmount = 0 ;
@@ -2077,7 +2077,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
20772077 bool signSuccess;
20782078 const CScript& scriptPubKey = coin.first ->vout [coin.second ].scriptPubKey ;
20792079 CScript& scriptSigRes = txNew.vin [nIn].scriptSig ;
2080- if (sign )
2080+ if (!(flags & CREATE_TX_DONT_SIGN) )
20812081 signSuccess = ProduceSignature (TransactionSignatureCreator (this , &txNewConst, nIn, SIGHASH_ALL), scriptPubKey, scriptSigRes);
20822082 else
20832083 signSuccess = ProduceSignature (DummySignatureCreator (this ), scriptPubKey, scriptSigRes);
@@ -2093,7 +2093,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
20932093 unsigned int nBytes = ::GetSerializeSize (txNew, SER_NETWORK, PROTOCOL_VERSION);
20942094
20952095 // Remove scriptSigs if we used dummy signatures for fee calculation
2096- if (!sign ) {
2096+ if (flags & CREATE_TX_DONT_SIGN ) {
20972097 BOOST_FOREACH (CTxIn& vin, txNew.vin )
20982098 vin.scriptSig = CScript ();
20992099 }
0 commit comments