Skip to content

Commit 745b4e0

Browse files
Merge #6567: chore: drop deprecated RPCs masternode current, masternode winner and getpoolinfo
7c81d53 chore: drop deprecated CoinJoin RPC `getpoolinfo` (Kittywhiskers Van Gogh) 7cdd4f3 chore: drop deprecated `masternode` RPC verbs `winner` and `current` (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * `masternode current`, `masternode winner` were deprecated in [dash#4060](#4060), which was included in Dash Core v0.17 * `getpoolinfo` was deprecated in [dash#3140](#3140), which was included in Dash Core v0.15. ## Breaking Changes Deprecated RPCs will no longer be available. ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)** - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 7c81d53 knst: utACK 7c81d53 Tree-SHA512: 3ee21be2114ebeb139694f77fe6dfc30ee6f9404db6b0aa328a8179a9091b189bf6494e5c54b637aa1ab4f06fa7c3edc6bba26eab2a97b5f987fcd66952040b6
2 parents d9704d3 + 7c81d53 commit 745b4e0

File tree

3 files changed

+6
-84
lines changed

3 files changed

+6
-84
lines changed

doc/release-notes-6567.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Updated RPCs
2+
------------
3+
4+
* The RPCs `masternode current` and `masternode winner` were deprecated in Dash Core
5+
v0.17 and are now removed.
6+
* The `getpoolinfo` RPC was deprecated in Dash Core v0.15 and is now removed.

src/rpc/coinjoin.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -365,21 +365,6 @@ static RPCHelpMan coinjoinsalt_set()
365365
}
366366
#endif // ENABLE_WALLET
367367

368-
// TODO: remove it completely
369-
static RPCHelpMan getpoolinfo()
370-
{
371-
return RPCHelpMan{"getpoolinfo",
372-
"DEPRECATED. Please use getcoinjoininfo instead.\n",
373-
{},
374-
RPCResults{},
375-
RPCExamples{""},
376-
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
377-
{
378-
throw JSONRPCError(RPC_METHOD_DEPRECATED, "Please use getcoinjoininfo instead");
379-
},
380-
};
381-
}
382-
383368
static RPCHelpMan getcoinjoininfo()
384369
{
385370
return RPCHelpMan{"getcoinjoininfo",
@@ -480,8 +465,6 @@ static const CRPCCommand commands[] =
480465
{ "dash", &coinjoinsalt_generate, },
481466
{ "dash", &coinjoinsalt_get, },
482467
{ "dash", &coinjoinsalt_set, },
483-
484-
{ "hidden", &getpoolinfo, },
485468
#endif // ENABLE_WALLET
486469
};
487470
// clang-format on

src/rpc/masternode.cpp

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -112,71 +112,6 @@ static RPCHelpMan masternode_count()
112112
};
113113
}
114114

115-
static UniValue GetNextMasternodeForPayment(const CChain& active_chain, CDeterministicMNManager& dmnman, int heightShift)
116-
{
117-
const CBlockIndex *tip = WITH_LOCK(::cs_main, return active_chain.Tip());
118-
auto mnList = dmnman.GetListForBlock(tip);
119-
auto payees = mnList.GetProjectedMNPayees(tip, heightShift);
120-
if (payees.empty())
121-
return "unknown";
122-
auto payee = payees.back();
123-
CScript payeeScript = payee->pdmnState->scriptPayout;
124-
125-
CTxDestination payeeDest;
126-
ExtractDestination(payeeScript, payeeDest);
127-
128-
UniValue obj(UniValue::VOBJ);
129-
130-
obj.pushKV("height", mnList.GetHeight() + heightShift);
131-
obj.pushKV("IP:port", payee->pdmnState->addr.ToStringAddrPort());
132-
obj.pushKV("proTxHash", payee->proTxHash.ToString());
133-
obj.pushKV("outpoint", payee->collateralOutpoint.ToStringShort());
134-
obj.pushKV("payee", IsValidDestination(payeeDest) ? EncodeDestination(payeeDest) : "UNKNOWN");
135-
return obj;
136-
}
137-
138-
// TODO: drop it
139-
static RPCHelpMan masternode_winner()
140-
{
141-
return RPCHelpMan{"masternode winner",
142-
"Print info on next masternode winner to vote for\n",
143-
{},
144-
RPCResults{},
145-
RPCExamples{""},
146-
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
147-
{
148-
if (!IsDeprecatedRPCEnabled("masternode_winner")) {
149-
throw std::runtime_error("DEPRECATED: set -deprecatedrpc=masternode_winner to enable it");
150-
}
151-
152-
const NodeContext& node = EnsureAnyNodeContext(request.context);
153-
const ChainstateManager& chainman = EnsureChainman(node);
154-
return GetNextMasternodeForPayment(chainman.ActiveChain(), *CHECK_NONFATAL(node.dmnman), 10);
155-
},
156-
};
157-
}
158-
159-
// TODO: drop it
160-
static RPCHelpMan masternode_current()
161-
{
162-
return RPCHelpMan{"masternode current",
163-
"Print info on current masternode winner to be paid the next block (calculated locally)\n",
164-
{},
165-
RPCResults{},
166-
RPCExamples{""},
167-
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
168-
{
169-
if (!IsDeprecatedRPCEnabled("masternode_current")) {
170-
throw std::runtime_error("DEPRECATED: set -deprecatedrpc=masternode_current to enable it");
171-
}
172-
173-
const NodeContext& node = EnsureAnyNodeContext(request.context);
174-
const ChainstateManager& chainman = EnsureChainman(node);
175-
return GetNextMasternodeForPayment(chainman.ActiveChain(), *CHECK_NONFATAL(node.dmnman), 1);
176-
},
177-
};
178-
}
179-
180115
#ifdef ENABLE_WALLET
181116
static RPCHelpMan masternode_outputs()
182117
{
@@ -753,8 +688,6 @@ static const CRPCCommand commands[] =
753688
{ "dash", &masternode_status, },
754689
{ "dash", &masternode_payments, },
755690
{ "dash", &masternode_winners, },
756-
{ "hidden", &masternode_current, },
757-
{ "hidden", &masternode_winner, },
758691
};
759692
// clang-format on
760693
for (const auto& command : commands) {

0 commit comments

Comments
 (0)