diff --git a/src/rpc/rpcquorums.cpp b/src/rpc/rpcquorums.cpp index 81fbf151b1..7afb0a6b75 100644 --- a/src/rpc/rpcquorums.cpp +++ b/src/rpc/rpcquorums.cpp @@ -111,6 +111,7 @@ static UniValue BuildQuorumInfo(const llmq::CQuorumCPtr& quorum, bool includeMem auto& dmn = quorum->members[i]; UniValue mo(UniValue::VOBJ); mo.pushKV("proTxHash", dmn->proTxHash.ToString()); + mo.pushKV("service", dmn->pdmnState->addr.ToString()); mo.pushKV("pubKeyOperator", dmn->pdmnState->pubKeyOperator.Get().ToString()); mo.pushKV("valid", quorum->qc->validMembers[i]); if (quorum->qc->validMembers[i]) { diff --git a/test/functional/rpc_quorum.py b/test/functional/rpc_quorum.py new file mode 100644 index 0000000000..d8dfd57bfc --- /dev/null +++ b/test/functional/rpc_quorum.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +# Copyright (c) 2022 The Dash Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +from test_framework.test_framework import DashTestFramework +from test_framework.util import assert_equal, p2p_port + +''' +rpc_quorum.py + +Test "quorum" rpc subcommands +''' + +class RPCMasternodeTest(DashTestFramework): + def set_test_params(self): + self.set_dash_test_params(4, 3, fast_dip3_enforcement=True) + + def run_test(self): + self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0) + self.wait_for_sporks_same() + quorum_hash = self.mine_quorum() + + quorum_info = self.nodes[0].quorum("info", 100, quorum_hash) + for idx in range(0, self.mn_count): + mn = self.mninfo[idx] + for member in quorum_info["members"]: + if member["proTxHash"] == mn.proTxHash: + assert_equal(member["service"], '127.0.0.1:%d' % p2p_port(mn.nodeIdx)) + +if __name__ == '__main__': + RPCMasternodeTest().main() diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index e8c17a1009..cba240c946 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -129,6 +129,7 @@ BASE_SCRIPTS = [ 'feature_reindex.py', 'feature_abortnode.py', # vv Tests less than 30s vv + 'rpc_quorum.py', 'wallet_keypool_topup.py', 'interface_zmq_dash.py', 'interface_zmq.py',