From 4f077caf3bd60ba4f18bdb5f6df62cf221f5c092 Mon Sep 17 00:00:00 2001 From: thephez Date: Wed, 23 Dec 2020 18:27:07 -0500 Subject: [PATCH] rpc: remove duplicated type field from gobject list-prepared (#3881) * rpc: remove duplicated type field from gobject list-prepared * Remove one more "type" --- src/governance/governance-object.cpp | 1 - test/functional/feature_governance_objects.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/governance/governance-object.cpp b/src/governance/governance-object.cpp index 451ea31aa9..f96dd65432 100644 --- a/src/governance/governance-object.cpp +++ b/src/governance/governance-object.cpp @@ -425,7 +425,6 @@ UniValue CGovernanceObject::ToJson() const obj.pushKV("collateralHash", GetCollateralHash().ToString()); obj.pushKV("createdAt", GetCreationTime()); obj.pushKV("revision", nRevision); - obj.pushKV("type", nObjectType); UniValue data; if (!data.read(GetDataAsPlainString())) { data.clear(); diff --git a/test/functional/feature_governance_objects.py b/test/functional/feature_governance_objects.py index 2bf4734a5c..d3b26d5745 100755 --- a/test/functional/feature_governance_objects.py +++ b/test/functional/feature_governance_objects.py @@ -14,7 +14,6 @@ def validate_object(prepared, rpc_prepared): assert_equal(prepared["collateralHash"], rpc_prepared["collateralHash"]) assert_equal(prepared["createdAt"], rpc_prepared["createdAt"]) assert_equal(prepared["revision"], rpc_prepared["revision"]) - assert_equal(prepared["type"], rpc_prepared["type"]) assert_equal(prepared["hex"], rpc_prepared["data"]["hex"]) del rpc_prepared["data"]["hex"] assert_equal(prepared["data"], rpc_prepared["data"]) @@ -43,7 +42,6 @@ class DashGovernanceTest (DashTestFramework): "collateralHash": collateral_hash, "createdAt": proposal_time, "revision": proposal_rev, - "type": object_type, "hex": proposal_hex, "data": proposal_template, }