From 00c9dbf700c1bee65186f1764433f23fd674a88f Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 28 Aug 2015 23:18:55 +0300 Subject: [PATCH] change `masternode status` to display 1000 DASH address --- src/rpcmasternode.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp index 201ecd8b7..47eb30497 100644 --- a/src/rpcmasternode.cpp +++ b/src/rpcmasternode.cpp @@ -439,16 +439,12 @@ Value masternode(const Array& params, bool fHelp) { if(!fMasterNode) throw runtime_error("This is not a masternode\n"); - CScript pubkey; - pubkey = GetScriptForDestination(activeMasternode.pubKeyMasternode.GetID()); - CTxDestination address1; - ExtractDestination(pubkey, address1); - CBitcoinAddress address2(address1); - Object mnObj; + CMasternode *pmn = mnodeman.Find(activeMasternode.vin); + mnObj.push_back(Pair("vin", activeMasternode.vin.ToString())); mnObj.push_back(Pair("service", activeMasternode.service.ToString())); - mnObj.push_back(Pair("pubKeyMasternode", address2.ToString())); + if (pmn) mnObj.push_back(Pair("pubkey", CBitcoinAddress(pmn->pubkey.GetID()).ToString())); mnObj.push_back(Pair("status", activeMasternode.GetStatus())); return mnObj; }