[RFC] add ObjectType to first-level JSON result (#1352)

This commit is contained in:
crowning- 2017-02-19 17:55:52 +01:00 committed by Holger Schinzel
parent f59bd434ad
commit e3288a7e14

View File

@ -584,6 +584,7 @@ UniValue gobject(const UniValue& params, bool fHelp)
bObj.push_back(Pair("DataString", pGovObj->GetDataAsString()));
bObj.push_back(Pair("Hash", pGovObj->GetHash().ToString()));
bObj.push_back(Pair("CollateralHash", pGovObj->GetCollateralHash().ToString()));
bObj.push_back(Pair("ObjectType", pGovObj->GetObjectType()));
bObj.push_back(Pair("CreationTime", pGovObj->GetCreationTime()));
const CTxIn& masternodeVin = pGovObj->GetMasternodeVin();
if(masternodeVin != CTxIn()) {
@ -635,6 +636,7 @@ UniValue gobject(const UniValue& params, bool fHelp)
objResult.push_back(Pair("DataString", pGovObj->GetDataAsString()));
objResult.push_back(Pair("Hash", pGovObj->GetHash().ToString()));
objResult.push_back(Pair("CollateralHash", pGovObj->GetCollateralHash().ToString()));
objResult.push_back(Pair("ObjectType", pGovObj->GetObjectType()));
objResult.push_back(Pair("CreationTime", pGovObj->GetCreationTime()));
const CTxIn& masternodeVin = pGovObj->GetMasternodeVin();
if(masternodeVin != CTxIn()) {