Merge branch 'v0.12.0.x'

This commit is contained in:
Evan Duffield 2015-09-02 05:22:45 -07:00
commit 0111107853
17 changed files with 134 additions and 52 deletions

View File

@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 12)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 51)
define(_CLIENT_VERSION_BUILD, 52)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2015)
AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])

View File

@ -17,7 +17,7 @@
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 12
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 51
#define CLIENT_VERSION_BUILD 52
//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true

View File

@ -1114,7 +1114,10 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
unsigned int nSize = entry.GetTxSize();
// Don't accept it if it can't get into a block
if(!ignoreFees){
// but prioritise dstx and don't check fees for it
if(mapDarksendBroadcastTxes.count(hash)) {
mempool.PrioritiseTransaction(hash, hash.ToString(), 1000, 0.1*COIN);
} else if(!ignoreFees){
CAmount txMinFee = GetMinRelayFee(tx, nSize, true);
if (fLimitFree && nFees < txMinFee)
return state.DoS(0, error("AcceptToMemoryPool : not enough fees %s, %d < %d",
@ -1187,7 +1190,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
}
bool AcceptableInputs(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
bool* pfMissingInputs, bool fRejectInsaneFee, bool ignoreFees)
bool* pfMissingInputs, bool fRejectInsaneFee, bool isDSTX)
{
AssertLockHeld(cs_main);
if (pfMissingInputs)
@ -1306,7 +1309,10 @@ bool AcceptableInputs(CTxMemPool& pool, CValidationState &state, const CTransact
unsigned int nSize = entry.GetTxSize();
// Don't accept it if it can't get into a block
if(!ignoreFees){
// but prioritise dstx and don't check fees for it
if(isDSTX) {
mempool.PrioritiseTransaction(hash, hash.ToString(), 1000, 0.1*COIN);
} else { // same as !ignoreFees for AcceptToMemoryPool
CAmount txMinFee = GetMinRelayFee(tx, nSize, true);
if (fLimitFree && nFees < txMinFee)
return state.DoS(0, error("AcceptableInputs : not enough fees %s, %d < %d",

View File

@ -238,7 +238,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
bool* pfMissingInputs, bool fRejectInsaneFee=false, bool ignoreFees=false);
bool AcceptableInputs(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
bool* pfMissingInputs, bool fRejectInsaneFee=false, bool ignoreFees=false);
bool* pfMissingInputs, bool fRejectInsaneFee=false, bool isDSTX=false);
int GetInputAge(CTxIn& vin);
int GetInputAgeIX(uint256 nTXHash, CTxIn& vin);

View File

@ -1144,22 +1144,22 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp, bool fPartial)
*/
vector<CInv> vInv;
int nInvCount = 0;
std::map<uint256, CBudgetProposalBroadcast>::iterator it1 = mapSeenMasternodeBudgetProposals.begin();
while(it1 != mapSeenMasternodeBudgetProposals.end()){
CBudgetProposal* pbudgetProposal = FindProposal((*it1).first);
if(pbudgetProposal && pbudgetProposal->fValid && (nProp == 0 || (*it1).first == nProp)){
CInv inv(MSG_BUDGET_PROPOSAL, (*it1).second.GetHash());
vInv.push_back(inv);
pfrom->PushInventory(CInv(MSG_BUDGET_PROPOSAL, (*it1).second.GetHash()));
nInvCount++;
//send votes
std::map<uint256, CBudgetVote>::iterator it2 = pbudgetProposal->mapVotes.begin();
while(it2 != pbudgetProposal->mapVotes.end()){
if((*it2).second.fValid){
if((fPartial && !(*it2).second.fSynced) || !fPartial) {
CInv inv(MSG_BUDGET_VOTE, (*it2).second.GetHash());
vInv.push_back(inv);
pfrom->PushInventory(CInv(MSG_BUDGET_VOTE, (*it2).second.GetHash()));
nInvCount++;
}
}
++it2;
@ -1168,27 +1168,26 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp, bool fPartial)
++it1;
}
pfrom->PushMessage("ssc", MASTERNODE_SYNC_BUDGET_PROP, (int)vInv.size());
if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
pfrom->PushMessage("ssc", MASTERNODE_SYNC_BUDGET_PROP, nInvCount);
LogPrintf("CBudgetManager::Sync - sent %d items\n", (int)vInv.size());
LogPrintf("CBudgetManager::Sync - sent %d items\n", nInvCount);
vInv.clear();
nInvCount = 0;
std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
while(it3 != mapSeenFinalizedBudgets.end()){
CFinalizedBudget* pfinalizedBudget = FindFinalizedBudget((*it3).first);
if(pfinalizedBudget && pfinalizedBudget->fValid && (nProp == 0 || (*it3).first == nProp)){
CInv inv(MSG_BUDGET_FINALIZED, (*it3).second.GetHash());
vInv.push_back(inv);
pfrom->PushInventory(CInv(MSG_BUDGET_FINALIZED, (*it3).second.GetHash()));
nInvCount++;
//send votes
std::map<uint256, CFinalizedBudgetVote>::iterator it4 = pfinalizedBudget->mapVotes.begin();
while(it4 != pfinalizedBudget->mapVotes.end()){
if((*it4).second.fValid) {
if((fPartial && !(*it4).second.fSynced) || !fPartial) {
CInv inv(MSG_BUDGET_FINALIZED_VOTE, (*it4).second.GetHash());
vInv.push_back(inv);
pfrom->PushInventory(CInv(MSG_BUDGET_FINALIZED_VOTE, (*it4).second.GetHash()));
nInvCount++;
}
}
++it4;
@ -1197,9 +1196,8 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp, bool fPartial)
++it3;
}
pfrom->PushMessage("ssc", MASTERNODE_SYNC_BUDGET_FIN, (int)vInv.size());
if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
LogPrintf("CBudgetManager::Sync - sent %d items\n", (int)vInv.size());
pfrom->PushMessage("ssc", MASTERNODE_SYNC_BUDGET_FIN, nInvCount);
LogPrintf("CBudgetManager::Sync - sent %d items\n", nInvCount);
}

View File

@ -598,7 +598,7 @@ void CMasternodePayments::CleanPaymentList()
if(chainActive.Tip() == NULL) return;
//keep up to five cycles for historical sake
int nLimit = std::max(((int)mnodeman.size())*2, 1000);
int nLimit = std::max(((int)mnodeman.size())*1.25, 1000);
std::map<uint256, CMasternodePaymentWinner>::iterator it = mapMasternodePayeeVotes.begin();
while(it != mapMasternodePayeeVotes.end()) {
@ -782,18 +782,17 @@ void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
int nCount = (mnodeman.CountEnabled()*2);
if(nCountNeeded > nCount) nCountNeeded = nCount;
vector<CInv> vInv;
int nInvCount = 0;
std::map<uint256, CMasternodePaymentWinner>::iterator it = mapMasternodePayeeVotes.begin();
while(it != mapMasternodePayeeVotes.end()) {
CMasternodePaymentWinner winner = (*it).second;
if(winner.nBlockHeight >= chainActive.Tip()->nHeight-nCountNeeded && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20) {
CInv inv(MSG_MASTERNODE_WINNER, winner.GetHash());
vInv.push_back(inv);
node->PushInventory(CInv(MSG_MASTERNODE_WINNER, winner.GetHash()));
nInvCount++;
}
++it;
}
node->PushMessage("ssc", MASTERNODE_SYNC_MNW, (int)vInv.size());
if(vInv.size() > 0) node->PushMessage("inv", vInv);
node->PushMessage("ssc", MASTERNODE_SYNC_MNW, nInvCount);
}
std::string CMasternodePayments::ToString() const

View File

@ -239,8 +239,8 @@ void CMasternodeSync::Process()
return;
}
//try syncing again in an hour
if(RequestedMasternodeAssets == MASTERNODE_SYNC_FAILED && lastFailure + (60*60) < GetTime()) {
//try syncing again
if(RequestedMasternodeAssets == MASTERNODE_SYNC_FAILED && lastFailure + (1*60) < GetTime()) {
Reset();
} else if (RequestedMasternodeAssets == MASTERNODE_SYNC_FAILED) {
return;
@ -265,7 +265,7 @@ void CMasternodeSync::Process()
} else if(RequestedMasternodeAttempt < 4) {
mnodeman.DsegUpdate(pnode);
} else if(RequestedMasternodeAttempt < 6) {
int nMnCount = mnodeman.CountEnabled()*2;
int nMnCount = mnodeman.CountEnabled();
pnode->PushMessage("mnget", nMnCount); //sync payees
uint256 n = 0;
pnode->PushMessage("mnvs", n); //sync masternode votes
@ -292,7 +292,7 @@ void CMasternodeSync::Process()
if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST) {
if(fDebug) LogPrintf("CMasternodeSync::Process() - lastMasternodeList %lld (GetTime() - MASTERNODE_SYNC_TIMEOUT) %lld\n", lastMasternodeList, GetTime() - MASTERNODE_SYNC_TIMEOUT);
if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD){ //hasn't received a new item in the last five seconds, so we'll move to the
if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - MASTERNODE_SYNC_TIMEOUT*2 && RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD){ //hasn't received a new item in the last five seconds, so we'll move to the
GetNextAsset();
return;
}
@ -302,7 +302,7 @@ void CMasternodeSync::Process()
// timeout
if(lastMasternodeList == 0 &&
(RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD*3 || GetTime() - nAssetSyncStarted > MASTERNODE_SYNC_TIMEOUT*3)) {
(RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD*3 || GetTime() - nAssetSyncStarted > MASTERNODE_SYNC_TIMEOUT*5)) {
if(IsSporkActive(SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT)) {
LogPrintf("CMasternodeSync::Process - ERROR - Sync has failed, will retry later\n");
RequestedMasternodeAssets = MASTERNODE_SYNC_FAILED;
@ -315,13 +315,15 @@ void CMasternodeSync::Process()
return;
}
if(RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD*3) return;
mnodeman.DsegUpdate(pnode);
RequestedMasternodeAttempt++;
return;
}
if(RequestedMasternodeAssets == MASTERNODE_SYNC_MNW) {
if(lastMasternodeWinner > 0 && lastMasternodeWinner < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD){ //hasn't received a new item in the last five seconds, so we'll move to the
if(lastMasternodeWinner > 0 && lastMasternodeWinner < GetTime() - MASTERNODE_SYNC_TIMEOUT*2 && RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD){ //hasn't received a new item in the last five seconds, so we'll move to the
GetNextAsset();
return;
}
@ -331,7 +333,7 @@ void CMasternodeSync::Process()
// timeout
if(lastMasternodeWinner == 0 &&
(RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD*3 || GetTime() - nAssetSyncStarted > MASTERNODE_SYNC_TIMEOUT*3)) {
(RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD*3 || GetTime() - nAssetSyncStarted > MASTERNODE_SYNC_TIMEOUT*5)) {
if(IsSporkActive(SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT)) {
LogPrintf("CMasternodeSync::Process - ERROR - Sync has failed, will retry later\n");
RequestedMasternodeAssets = MASTERNODE_SYNC_FAILED;
@ -344,11 +346,12 @@ void CMasternodeSync::Process()
return;
}
if(RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD*3) return;
CBlockIndex* pindexPrev = chainActive.Tip();
if(pindexPrev == NULL) return;
int nMnCount = mnodeman.CountEnabled()*2;
int nMnCount = mnodeman.CountEnabled();
pnode->PushMessage("mnget", nMnCount); //sync payees
RequestedMasternodeAttempt++;
@ -360,7 +363,7 @@ void CMasternodeSync::Process()
if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
//we'll start rejecting votes if we accidentally get set as synced too soon
if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD){ //hasn't received a new item in the last five seconds, so we'll move to the
if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT*2 && RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD){ //hasn't received a new item in the last five seconds, so we'll move to the
//LogPrintf("CMasternodeSync::Process - HasNextFinalizedBudget %d nCountFailures %d IsBudgetPropEmpty %d\n", budget.HasNextFinalizedBudget(), nCountFailures, IsBudgetPropEmpty());
//if(budget.HasNextFinalizedBudget() || nCountFailures >= 2 || IsBudgetPropEmpty()) {
GetNextAsset();
@ -379,7 +382,7 @@ void CMasternodeSync::Process()
// timeout
if(lastBudgetItem == 0 &&
(RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD*3 || GetTime() - nAssetSyncStarted > MASTERNODE_SYNC_TIMEOUT*3)) {
(RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD*3 || GetTime() - nAssetSyncStarted > MASTERNODE_SYNC_TIMEOUT*5)) {
// maybe there is no budgets at all, so just finish syncing
GetNextAsset();
activeMasternode.ManageStatus();
@ -389,6 +392,8 @@ void CMasternodeSync::Process()
if(pnode->HasFulfilledRequest("busync")) continue;
pnode->FulfilledRequest("busync");
if(RequestedMasternodeAttempt >= MASTERNODE_SYNC_THRESHOLD*3) return;
uint256 n = 0;
pnode->PushMessage("mnvs", n); //sync masternode votes
RequestedMasternodeAttempt++;

View File

@ -16,7 +16,7 @@
#define MASTERNODE_SYNC_FINISHED 999
#define MASTERNODE_SYNC_TIMEOUT 5
#define MASTERNODE_SYNC_THRESHOLD 4
#define MASTERNODE_SYNC_THRESHOLD 2
class CMasternodeSync;
extern CMasternodeSync masternodeSync;

View File

@ -258,7 +258,7 @@ int64_t CMasternode::GetLastPaid() {
const CBlockIndex *BlockReading = chainActive.Tip();
int nMnCount = mnodeman.CountEnabled()*2;
int nMnCount = mnodeman.CountEnabled()*1.25;
int n = 0;
for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) {
if(n >= nMnCount){

View File

@ -771,8 +771,8 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
} //else, asking for a specific node which is ok
std::vector<CInv> vInv;
int i = 0;
int nInvCount = 0;
BOOST_FOREACH(CMasternode& mn, vMasternodes) {
if(mn.addr.IsRFC1918()) continue; //local network
@ -781,24 +781,23 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
if(vin == CTxIn() || vin == mn.vin){
CMasternodeBroadcast mnb = CMasternodeBroadcast(mn);
uint256 hash = mnb.GetHash();
CInv inv(MSG_MASTERNODE_ANNOUNCE, hash);
vInv.push_back(inv);
pfrom->PushInventory(CInv(MSG_MASTERNODE_ANNOUNCE, hash));
nInvCount++;
if(!mapSeenMasternodeBroadcast.count(hash)) mapSeenMasternodeBroadcast.insert(make_pair(hash, mnb));
if(vin == mn.vin) {
LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString());
break;
return;
}
}
i++;
}
}
if(vin == CTxIn()) pfrom->PushMessage("ssc", MASTERNODE_SYNC_LIST, (int)vInv.size());
if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
if(vin == CTxIn()) LogPrintf("dseg - Sent %d Masternode entries to %s\n", i, pfrom->addr.ToString());
if(vin == CTxIn()) {
pfrom->PushMessage("ssc", MASTERNODE_SYNC_LIST, nInvCount);
LogPrintf("dseg - Sent %d Masternode entries to %s\n", nInvCount, pfrom->addr.ToString());
}
}
/*
* IT'S SAFE TO REMOVE THIS IN FURTHER VERSIONS

View File

@ -391,7 +391,9 @@ CNode* FindNode(const CService& addr)
CNode* ConnectNode(CAddress addrConnect, const char *pszDest, bool darkSendMaster)
{
if (pszDest == NULL) {
if (IsLocal(addrConnect))
// we clean masternode connections in CMasternodeMan::ProcessMasternodeConnections()
// so should be safe to skip this and connect to local Hot MN on CActiveMasternode::ManageStatus()
if (IsLocal(addrConnect) && !darkSendMaster)
return NULL;
// Look for an existing connection

View File

@ -121,6 +121,9 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) :
// (un)select all
connect(ui->pushButtonSelectAll, SIGNAL(clicked()), this, SLOT(buttonSelectAllClicked()));
// Toggle lock state
connect(ui->pushButtonToggleLock, SIGNAL(clicked()), this, SLOT(buttonToggleLockClicked()));
// change coin control first column label due Qt4 bug.
// see https://github.com/bitcoin/bitcoin/issues/5716
ui->treeWidget->headerItem()->setText(COLUMN_CHECKBOX, QString());
@ -210,6 +213,40 @@ void CoinControlDialog::buttonSelectAllClicked()
CoinControlDialog::updateLabels(model, this);
}
// Toggle lock state
void CoinControlDialog::buttonToggleLockClicked()
{
QTreeWidgetItem *item;
// Works in list-mode only
if(ui->radioListMode->isChecked()){
ui->treeWidget->setEnabled(false);
for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++){
item = ui->treeWidget->topLevelItem(i);
COutPoint outpt(uint256(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt());
if (model->isLockedCoin(uint256(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt())){
model->unlockCoin(outpt);
item->setDisabled(false);
item->setIcon(COLUMN_CHECKBOX, QIcon());
}
else{
model->lockCoin(outpt);
item->setDisabled(true);
item->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed"));
}
updateLabelLocked();
}
ui->treeWidget->setEnabled(true);
CoinControlDialog::updateLabels(model, this);
}
else{
QMessageBox msgBox;
msgBox.setObjectName("lockMessageBox");
msgBox.setStyleSheet(GUIUtil::loadStyleSheet());
msgBox.setText(tr("Please switch to \"List mode\" to use this function."));
msgBox.exec();
}
}
// context menu
void CoinControlDialog::showMenu(const QPoint &point)
{

View File

@ -122,6 +122,7 @@ private slots:
void headerSectionClicked(int);
void buttonBoxClicked(QAbstractButton*);
void buttonSelectAllClicked();
void buttonToggleLockClicked();
void updateLabelLocked();
};

View File

@ -348,7 +348,7 @@
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayoutPanel" stretch="0,0,0,0,0">
<layout class="QHBoxLayout" name="horizontalLayoutPanel" stretch="0,0,0,0,0,0">
<property name="spacing">
<number>14</number>
</property>
@ -368,6 +368,22 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonToggleLock">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>toggle lock state</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioTreeMode">
<property name="sizePolicy">

View File

@ -1328,6 +1328,12 @@ padding-right:10px;
min-height:25px;
}
QDialog#CoinControlDialog .QFrame#frame .QPushButton#pushButtonToggleLock { /* Toggle lock state button */
padding-left:10px;
padding-right:10px;
min-height:25px;
}
QDialog#CoinControlDialog .QDialogButtonBox#buttonBox QPushButton { /* Coin Control 'OK' button */
}

View File

@ -394,6 +394,7 @@ Value mnbudget(const Array& params, bool fHelp)
CBitcoinAddress address2(address1);
Object bObj;
bObj.push_back(Pair("Name", pbudgetProposal->GetName()));
bObj.push_back(Pair("URL", pbudgetProposal->GetURL()));
bObj.push_back(Pair("Hash", pbudgetProposal->GetHash().ToString()));
bObj.push_back(Pair("FeeHash", pbudgetProposal->nFeeTXHash.ToString()));

View File

@ -342,6 +342,12 @@ Value masternode(const Array& params, bool fHelp)
}
}
if((strCommand == "start-missing" || strCommand == "start-disabled") &&
(masternodeSync.RequestedMasternodeAssets <= MASTERNODE_SYNC_LIST ||
masternodeSync.RequestedMasternodeAssets == MASTERNODE_SYNC_FAILED)) {
throw runtime_error("You can't use this command until masternode list is synced\n");
}
std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
mnEntries = masternodeConfig.getEntries();
@ -405,12 +411,18 @@ Value masternode(const Array& params, bool fHelp)
Object resultObj;
BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
CTxIn vin = CTxIn(uint256(mne.getTxHash()), uint32_t(atoi(mne.getOutputIndex().c_str())));
CMasternode *pmn = mnodeman.Find(vin);
std::string strStatus = pmn ? pmn->Status() : "MISSING";
Object mnObj;
mnObj.push_back(Pair("alias", mne.getAlias()));
mnObj.push_back(Pair("address", mne.getIp()));
mnObj.push_back(Pair("privateKey", mne.getPrivKey()));
mnObj.push_back(Pair("txHash", mne.getTxHash()));
mnObj.push_back(Pair("outputIndex", mne.getOutputIndex()));
mnObj.push_back(Pair("status", strStatus));
resultObj.push_back(Pair("masternode", mnObj));
}