Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions src/rpcdarksend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,14 +475,26 @@ UniValue masternode(const UniValue& params, bool fHelp) {
}
}

if (strCommand == "outputs"){
if (strCommand == "outputs") {
// Find possible candidates
vector<COutput> 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<std::string>(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<std::string>(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<std::string>(out.i)));
}
}

}

return obj;
}

Expand Down Expand Up @@ -565,20 +577,7 @@ UniValue masternode(const UniValue& params, bool fHelp) {

return resultObj;
}

if (strCommand == "outputs") {
// Find possible candidates
vector<COutput> possibleCoins = activeMasternode.SelectCoinsMasternode();

UniValue obj(UniValue::VOBJ);
for (COutput& out : possibleCoins) {
obj.push_back(Pair(out.tx->GetHash().ToString().c_str(), boost::lexical_cast<std::string>(out.i)));
}

return obj;

}


return NullUniValue;
}