diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h --- a/src/interfaces/wallet.h +++ b/src/interfaces/wallet.h @@ -283,7 +283,6 @@ //! Send pending transaction and commit to wallet. virtual bool commit(WalletValueMap value_map, WalletOrderForm order_form, - std::string from_account, std::string &reject_reason) = 0; }; diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -47,14 +47,13 @@ const CTransaction &get() override { return *m_tx; } bool commit(WalletValueMap value_map, WalletOrderForm order_form, - std::string from_account, std::string &reject_reason) override { auto locked_chain = m_wallet.chain().lock(); LOCK(m_wallet.cs_wallet); CValidationState state; - if (!m_wallet.CommitTransaction( - m_tx, std::move(value_map), std::move(order_form), - std::move(from_account), m_key, g_connman.get(), state)) { + if (!m_wallet.CommitTransaction(m_tx, std::move(value_map), + std::move(order_form), m_key, + g_connman.get(), state)) { reject_reason = state.GetRejectReason(); return false; } diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -262,7 +262,7 @@ auto &newTx = transaction.getWtx(); std::string rejectReason; if (!newTx->commit({} /* mapValue */, std::move(vOrderForm), - {} /* fromAccount */, rejectReason)) { + rejectReason)) { return SendCoinsReturn(TransactionCommitFailed, QString::fromStdString(rejectReason)); } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -389,8 +389,7 @@ } CValidationState state; if (!pwallet->CommitTransaction(tx, std::move(mapValue), {} /* orderForm */, - "" /* account */, reservekey, - g_connman.get(), state)) { + reservekey, g_connman.get(), state)) { strError = strprintf("Error: The transaction was rejected! Reason given: %s", FormatStateMessage(state)); @@ -1076,8 +1075,7 @@ } CValidationState state; if (!pwallet->CommitTransaction(tx, std::move(mapValue), {} /* orderForm */, - "" /* account */, keyChange, - g_connman.get(), state)) { + keyChange, g_connman.get(), state)) { strFailReason = strprintf("Transaction commit failed:: %s", FormatStateMessage(state)); throw JSONRPCError(RPC_WALLET_ERROR, strFailReason); diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -330,8 +330,8 @@ reservekey, fee, changePos, error, dummy)); CValidationState state; - BOOST_CHECK(wallet->CommitTransaction(tx, {}, {}, {}, reservekey, - nullptr, state)); + BOOST_CHECK( + wallet->CommitTransaction(tx, {}, {}, reservekey, nullptr, state)); CMutableTransaction blocktx; { LOCK(wallet->cs_wallet); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1119,8 +1119,7 @@ bool CommitTransaction( CTransactionRef tx, mapValue_t mapValue, std::vector> orderForm, - std::string fromAccount, CReserveKey &reservekey, CConnman *connman, - CValidationState &state); + CReserveKey &reservekey, CConnman *connman, CValidationState &state); bool DummySignTx(CMutableTransaction &txNew, const std::set &txouts, bool use_max_sig = false) const { diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3370,15 +3370,13 @@ bool CWallet::CommitTransaction( CTransactionRef tx, mapValue_t mapValue, std::vector> orderForm, - std::string fromAccount, CReserveKey &reservekey, CConnman *connman, - CValidationState &state) { + CReserveKey &reservekey, CConnman *connman, CValidationState &state) { auto locked_chain = chain().lock(); LOCK(cs_wallet); CWalletTx wtxNew(this, std::move(tx)); wtxNew.mapValue = std::move(mapValue); wtxNew.vOrderForm = std::move(orderForm); - wtxNew.strFromAccount = std::move(fromAccount); wtxNew.fTimeReceivedIsTxTime = true; wtxNew.fFromMe = true;