Reputation: 1
I have been at this for two days now. CreateTransaction's 7th arg new to the code and is being used successfully in calls elsewhere in the program.
In FundTransaction an empty string is created with the following.
std::string strTxComment;
That is then passed into.
CreateTransaction(vecSend, wtx, reservekey, nFeeRet, nChangePosRet, strFailReason, strTxComment, coinControl, false)
Which has the definition.
bool CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, int& nChangePosRet, std::string& strFailReason, std::string strTxComment, const CCoinControl *coinControl = NULL, bool sign = true);
Then we get the following error which complains about the 9th arg not the new 7th strTxComment arg.
wallet/wallet.cpp: In member function ‘bool CWallet::FundTransaction(CMutableTransaction&, CAmount&, int&, std::string&, bool)’:
wallet/wallet.cpp:1927:125: error: no matching function for call to ‘CWallet::CreateTransaction(std::vector<CRecipient>&, CWalletTx&, CReserveKey&, CAmount&, int&, std::string&, std::string&, CCoinControl&, bool)’
if (!CreateTransaction(vecSend, wtx, reservekey, nFeeRet, nChangePosRet, strFailReason, strTxComment, coinControl, false))
^
wallet/wallet.cpp:1927:125: note: candidate is:
In file included from wallet/wallet.cpp:6:0:
./wallet/wallet.h:670:10: note: bool CWallet::CreateTransaction(const std::vector<CRecipient>&, CWalletTx&, CReserveKey&, CAmount&, int&, std::string&, std::string&, const CCoinControl*, bool)
bool CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, int& nChangePosRet, std::string& strFailReason, std::string strTxComment, const CCoinControl *coinControl = NULL, bool sign = true);
^
./wallet/wallet.h:670:10: note: no known conversion for argument 8 from ‘CCoinControl’ to ‘const CCoinControl*’
Revert the code prior to the change to CreateTransaction and FundTransaction calls it in the exactly the same way with no changes to the coinControl argument.
I'm not expecting a solution but need some help at this point as I'm very much stuck.
Upvotes: 0
Views: 42
Reputation: 25895
You didn't show us coinControl, but it seems that's not a pointer. Try sending
&coinControl
Upvotes: 1