Skip to content

Commit d8da094

Browse files
Merge #6247: feat: drop deprecated protx *_hpmn RPC entry points in favor of protx *_evo
6f0b546 feat: drop deprecated protx_*_hpmn RPC entry points in favor of protx_*_evo (Konstantin Akimov) Pull request description: ## What was done? Drop deprecated protx *_hpmn RPC entry points in favor of protx *_evo Full list of removed composite RPC: - protx register_fund_hpmn - protx register_hpmn - protx register_prepare_hpmn - protx update_service_hpmn ## How Has This Been Tested? **platform still uses it, need to replace `_hpmn` suffixes to `_evo` and remove -deprecated_hpmn from dash.conf** shumkov please be notified that mentioned RPC are going to be removed in Dash Core v22 as deprecated, this PR requires your approval ## Breaking Changes Removed RPC: - protx register_fund_hpmn - protx register_hpmn - protx register_prepare_hpmn - protx update_service_hpmn ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: utACK 6f0b546 PastaPastaPasta: utACK 6f0b546 Tree-SHA512: 6667c34da5e9879b0d0bc326f6e42de4ee886c3b3e61fe4e76e80e3dbd16a8e27aa98435465ba9e41d5097557d2f924948031b0fe5099121b742106d45869426
2 parents c200175 + 6f0b546 commit d8da094

File tree

2 files changed

+11
-68
lines changed

2 files changed

+11
-68
lines changed

doc/release-notes-6247.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### RPC changes
2+
3+
- Deprecated `protx *_hpmn` RPC entry points have been droppepd in favor of `protx *_evo`. The following have been removed: `protx register_fund_hpmn`, `protx register_hpmn`, `protx register_prepare_hpmn`, `protx update_service_hpmn`

src/rpc/evo.cpp

Lines changed: 8 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,9 @@ static RPCHelpMan protx_register_prepare_legacy()
505505
return protx_register_prepare_wrapper(true);
506506
}
507507

508-
static RPCHelpMan protx_register_fund_evo_wrapper(bool use_hpmn_suffix)
508+
static RPCHelpMan protx_register_fund_evo()
509509
{
510-
const std::string command_name{use_hpmn_suffix ? "protx register_fund_hpmn" : "protx register_fund_evo"};
510+
const std::string command_name{"protx register_fund_evo"};
511511
return RPCHelpMan{
512512
command_name,
513513
"\nCreates, funds and sends a ProTx to the network. The resulting transaction will move 4000 Dash\n"
@@ -540,28 +540,14 @@ static RPCHelpMan protx_register_fund_evo_wrapper(bool use_hpmn_suffix)
540540
HelpExampleCli("protx", "register_fund_evo \"" + EXAMPLE_ADDRESS[0] + "\" \"1.2.3.4:1234\" \"" + EXAMPLE_ADDRESS[1] + "\" \"93746e8731c57f87f79b3620a7982924e2931717d49540a85864bd543de11c43fb868fd63e501a1db37e19ed59ae6db4\" \"" + EXAMPLE_ADDRESS[1] + "\" 0 \"" + EXAMPLE_ADDRESS[0] + "\" \"f2dbd9b0a1f541a7c44d34a58674d0262f5feca5\" 22821 22822")},
541541
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
542542
{
543-
if (use_hpmn_suffix && !IsDeprecatedRPCEnabled("hpmn")) {
544-
throw JSONRPCError(RPC_METHOD_DEPRECATED, "*_hpmn methods are deprecated. Use the related *_evo methods or set -deprecatedrpc=hpmn to enable them");
545-
}
546-
547543
return protx_register_common_wrapper(request, false, ProTxRegisterAction::Fund, MnType::Evo);
548544
},
549545
};
550546
}
551547

552-
static RPCHelpMan protx_register_fund_evo()
553-
{
554-
return protx_register_fund_evo_wrapper(false);
555-
}
556-
557-
static RPCHelpMan protx_register_fund_hpmn()
558-
{
559-
return protx_register_fund_evo_wrapper(true);
560-
}
561-
562-
static RPCHelpMan protx_register_evo_wrapper(bool use_hpmn_suffix)
548+
static RPCHelpMan protx_register_evo()
563549
{
564-
const std::string command_name{use_hpmn_suffix ? "protx register_hpmn" : "protx register_evo"};
550+
const std::string command_name{"protx register_evo"};
565551
return RPCHelpMan{
566552
command_name,
567553
"\nSame as \"protx register_fund_evo\", but with an externally referenced collateral.\n"
@@ -593,28 +579,14 @@ static RPCHelpMan protx_register_evo_wrapper(bool use_hpmn_suffix)
593579
HelpExampleCli("protx", "register_evo \"0123456701234567012345670123456701234567012345670123456701234567\" 0 \"1.2.3.4:1234\" \"" + EXAMPLE_ADDRESS[1] + "\" \"93746e8731c57f87f79b3620a7982924e2931717d49540a85864bd543de11c43fb868fd63e501a1db37e19ed59ae6db4\" \"" + EXAMPLE_ADDRESS[1] + "\" 0 \"" + EXAMPLE_ADDRESS[0] + "\" \"f2dbd9b0a1f541a7c44d34a58674d0262f5feca5\" 22821 22822")},
594580
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
595581
{
596-
if (use_hpmn_suffix && !IsDeprecatedRPCEnabled("hpmn")) {
597-
throw JSONRPCError(RPC_METHOD_DEPRECATED, "*_hpmn methods are deprecated. Use the related *_evo methods or set -deprecatedrpc=hpmn to enable them");
598-
}
599-
600582
return protx_register_common_wrapper(request, false, ProTxRegisterAction::External, MnType::Evo);
601583
},
602584
};
603585
}
604586

605-
static RPCHelpMan protx_register_evo()
606-
{
607-
return protx_register_evo_wrapper(false);
608-
}
609-
610-
static RPCHelpMan protx_register_hpmn()
611-
{
612-
return protx_register_evo_wrapper(true);
613-
}
614-
615-
static RPCHelpMan protx_register_prepare_evo_wrapper(bool use_hpmn_suffix)
587+
static RPCHelpMan protx_register_prepare_evo()
616588
{
617-
const std::string command_name{use_hpmn_suffix ? "protx register_prepare_hpmn" : "protx register_prepare_evo"};
589+
const std::string command_name{"protx register_prepare_evo"};
618590
return RPCHelpMan{
619591
command_name,
620592
"\nCreates an unsigned ProTx and a message that must be signed externally\n"
@@ -643,25 +615,11 @@ static RPCHelpMan protx_register_prepare_evo_wrapper(bool use_hpmn_suffix)
643615
RPCExamples{HelpExampleCli("protx", "register_prepare_evo \"0123456701234567012345670123456701234567012345670123456701234567\" 0 \"1.2.3.4:1234\" \"" + EXAMPLE_ADDRESS[1] + "\" \"93746e8731c57f87f79b3620a7982924e2931717d49540a85864bd543de11c43fb868fd63e501a1db37e19ed59ae6db4\" \"" + EXAMPLE_ADDRESS[1] + "\" 0 \"" + EXAMPLE_ADDRESS[0] + "\" \"f2dbd9b0a1f541a7c44d34a58674d0262f5feca5\" 22821 22822")},
644616
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
645617
{
646-
if (use_hpmn_suffix && !IsDeprecatedRPCEnabled("hpmn")) {
647-
throw JSONRPCError(RPC_METHOD_DEPRECATED, "*_hpmn methods are deprecated. Use the related *_evo methods or set -deprecatedrpc=hpmn to enable them");
648-
}
649-
650618
return protx_register_common_wrapper(request, false, ProTxRegisterAction::Prepare, MnType::Evo);
651619
},
652620
};
653621
}
654622

655-
static RPCHelpMan protx_register_prepare_evo()
656-
{
657-
return protx_register_prepare_evo_wrapper(false);
658-
}
659-
660-
static RPCHelpMan protx_register_prepare_hpmn()
661-
{
662-
return protx_register_prepare_evo_wrapper(true);
663-
}
664-
665623
static UniValue protx_register_common_wrapper(const JSONRPCRequest& request,
666624
const bool specific_legacy_bls_scheme,
667625
const ProTxRegisterAction action,
@@ -961,9 +919,9 @@ static RPCHelpMan protx_update_service()
961919
};
962920
}
963921

964-
static RPCHelpMan protx_update_service_evo_wrapper(bool use_hpmn_suffix)
922+
static RPCHelpMan protx_update_service_evo()
965923
{
966-
const std::string command_name{use_hpmn_suffix ? "protx update_service_hpmn" : "protx update_service_evo"};
924+
const std::string command_name{"protx update_service_evo"};
967925
return RPCHelpMan{
968926
command_name,
969927
"\nCreates and sends a ProUpServTx to the network. This will update the IP address and the Platform fields\n"
@@ -986,25 +944,11 @@ static RPCHelpMan protx_update_service_evo_wrapper(bool use_hpmn_suffix)
986944
HelpExampleCli("protx", "update_service_evo \"0123456701234567012345670123456701234567012345670123456701234567\" \"1.2.3.4:1234\" \"5a2e15982e62f1e0b7cf9783c64cf7e3af3f90a52d6c40f6f95d624c0b1621cd\" \"f2dbd9b0a1f541a7c44d34a58674d0262f5feca5\" 22821 22822")},
987945
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
988946
{
989-
if (use_hpmn_suffix && !IsDeprecatedRPCEnabled("hpmn")) {
990-
throw JSONRPCError(RPC_METHOD_DEPRECATED, "*_hpmn methods are deprecated. Use the related *_evo methods or set -deprecatedrpc=hpmn to enable them");
991-
}
992-
993947
return protx_update_service_common_wrapper(request, MnType::Evo);
994948
},
995949
};
996950
}
997951

998-
static RPCHelpMan protx_update_service_evo()
999-
{
1000-
return protx_update_service_evo_wrapper(false);
1001-
}
1002-
1003-
static RPCHelpMan protx_update_service_hpmn()
1004-
{
1005-
return protx_update_service_evo_wrapper(true);
1006-
}
1007-
1008952
static UniValue protx_update_service_common_wrapper(const JSONRPCRequest& request, const MnType mnType)
1009953
{
1010954
const NodeContext& node = EnsureAnyNodeContext(request.context);
@@ -1880,19 +1824,15 @@ static const CRPCCommand commands[] =
18801824
#ifdef ENABLE_WALLET
18811825
{ "evo", &protx_register, },
18821826
{ "evo", &protx_register_evo, },
1883-
{ "evo", &protx_register_hpmn, },
18841827
{ "evo", &protx_register_legacy, },
18851828
{ "evo", &protx_register_fund, },
18861829
{ "evo", &protx_register_fund_legacy, },
18871830
{ "evo", &protx_register_fund_evo, },
1888-
{ "evo", &protx_register_fund_hpmn, },
18891831
{ "evo", &protx_register_prepare, },
18901832
{ "evo", &protx_register_prepare_evo, },
1891-
{ "evo", &protx_register_prepare_hpmn, },
18921833
{ "evo", &protx_register_prepare_legacy, },
18931834
{ "evo", &protx_update_service, },
18941835
{ "evo", &protx_update_service_evo, },
1895-
{ "evo", &protx_update_service_hpmn, },
18961836
{ "evo", &protx_register_submit, },
18971837
{ "evo", &protx_update_registrar, },
18981838
{ "evo", &protx_update_registrar_legacy, },

0 commit comments

Comments
 (0)