diff --git a/src/rpcdarksend.cpp b/src/rpcdarksend.cpp index 2b7a7abc..338feae7 100644 --- a/src/rpcdarksend.cpp +++ b/src/rpcdarksend.cpp @@ -475,14 +475,26 @@ UniValue masternode(const UniValue& params, bool fHelp) { } } - if (strCommand == "outputs"){ + if (strCommand == "outputs") { // Find possible candidates vector possibleCoins = activeMasternode.SelectCoinsMasternode(); - UniValue obj(UniValue::VOBJ); - for (const auto& out : possibleCoins) { - obj.push_back(Pair(out.tx->GetHash().ToString().c_str(), boost::lexical_cast(out.i))); + + for (COutput& out : possibleCoins) { + + for (CMasternodeConfig::CMasternodeEntry mne : masternodeConfig.getEntries()) { // check if the TXID is currently in masternode.conf, + + std::string MNC = mne.getTxHash(); // TXID from masternode in masternode.conf + std::string possibleMN = out.tx->GetHash().ToString(); // TXID for 16120 LUX tx + if (possibleMN==MNC){ + obj.push_back(Pair(out.tx->GetHash().ToString().c_str(), boost::lexical_cast(out.i) + " TXID is being used by a MN in your wallet," + " MN alias = " + mne.getAlias().c_str()) ); + }else{ + obj.push_back(Pair(out.tx->GetHash().ToString().c_str(), boost::lexical_cast(out.i))); + } + } + } + return obj; } @@ -565,20 +577,7 @@ UniValue masternode(const UniValue& params, bool fHelp) { return resultObj; } - - if (strCommand == "outputs") { - // Find possible candidates - vector possibleCoins = activeMasternode.SelectCoinsMasternode(); - - UniValue obj(UniValue::VOBJ); - for (COutput& out : possibleCoins) { - obj.push_back(Pair(out.tx->GetHash().ToString().c_str(), boost::lexical_cast(out.i))); - } - - return obj; - - } - + return NullUniValue; }