mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Remove deprecated unl_add and unl_delete commands
This commit is contained in:
@@ -2969,14 +2969,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\UnlAdd.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\UnlDelete.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\UnlList.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||
|
||||
@@ -3540,12 +3540,6 @@
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\TxHistory.cpp">
|
||||
<Filter>ripple\rpc\handlers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\UnlAdd.cpp">
|
||||
<Filter>ripple\rpc\handlers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\UnlDelete.cpp">
|
||||
<Filter>ripple\rpc\handlers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\UnlList.cpp">
|
||||
<Filter>ripple\rpc\handlers</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -874,37 +874,6 @@ private:
|
||||
return jvRequest;
|
||||
}
|
||||
|
||||
// unl_add <domain>|<node_public> [<comment>]
|
||||
Json::Value parseUnlAdd (Json::Value const& jvParams)
|
||||
{
|
||||
std::string strNode = jvParams[0u].asString ();
|
||||
std::string strComment = (jvParams.size () == 2) ? jvParams[1u].asString () : "";
|
||||
|
||||
if (strNode.length ())
|
||||
{
|
||||
Json::Value jvRequest;
|
||||
|
||||
jvRequest[jss::node] = strNode;
|
||||
|
||||
if (strComment.length ())
|
||||
jvRequest[jss::comment] = strComment;
|
||||
|
||||
return jvRequest;
|
||||
}
|
||||
|
||||
return rpcError (rpcINVALID_PARAMS);
|
||||
}
|
||||
|
||||
// unl_delete <domain>|<public_key>
|
||||
Json::Value parseUnlDelete (Json::Value const& jvParams)
|
||||
{
|
||||
Json::Value jvRequest;
|
||||
|
||||
jvRequest[jss::node] = jvParams[0u].asString ();
|
||||
|
||||
return jvRequest;
|
||||
}
|
||||
|
||||
// validation_create [<pass_phrase>|<seed>|<seed_key>]
|
||||
//
|
||||
// NOTE: It is poor security to specify secret information on the command line. This information might be saved in the command
|
||||
@@ -1078,8 +1047,6 @@ public:
|
||||
{ "tx", &RPCParser::parseTx, 1, 2 },
|
||||
{ "tx_account", &RPCParser::parseTxAccount, 1, 7 },
|
||||
{ "tx_history", &RPCParser::parseTxHistory, 1, 1 },
|
||||
{ "unl_add", &RPCParser::parseUnlAdd, 1, 2 },
|
||||
{ "unl_delete", &RPCParser::parseUnlDelete, 1, 1 },
|
||||
{ "unl_list", &RPCParser::parseAsIs, 0, 0 },
|
||||
{ "validation_create", &RPCParser::parseValidationCreate, 0, 1 },
|
||||
{ "validation_seed", &RPCParser::parseValidationSeed, 0, 1 },
|
||||
|
||||
@@ -119,7 +119,7 @@ JSS ( closed_ledger ); // out: NetworkOPs
|
||||
JSS ( cluster ); // out: UniqueNodeList, PeerImp
|
||||
JSS ( code ); // out: errors
|
||||
JSS ( command ); // in: RPCHandler
|
||||
JSS ( comment ); // in: UnlAdd
|
||||
JSS ( comment ); // out: UnlList
|
||||
JSS ( complete ); // out: NetworkOPs, InboundLedger
|
||||
JSS ( complete_ledgers ); // out: NetworkOPs, PeerImp
|
||||
JSS ( consensus ); // out: NetworkOPs, LedgerConsensus
|
||||
@@ -288,7 +288,7 @@ JSS ( needed_transaction_hashes ); // out: InboundLedger
|
||||
JSS ( network_ledger ); // out: NetworkOPs
|
||||
JSS ( no_ripple ); // out: AccountLines
|
||||
JSS ( no_ripple_peer ); // out: AccountLines
|
||||
JSS ( node ); // in: UnlAdd, UnlDelete
|
||||
JSS ( node ); // out: LedgerEntry
|
||||
JSS ( node_binary ); // out: LedgerEntry
|
||||
JSS ( node_hit_rate ); // out: GetCounts
|
||||
JSS ( node_read_bytes ); // out: GetCounts
|
||||
|
||||
@@ -76,14 +76,7 @@ Json::Value doSubscribe (RPC::Context&);
|
||||
Json::Value doTransactionEntry (RPC::Context&);
|
||||
Json::Value doTx (RPC::Context&);
|
||||
Json::Value doTxHistory (RPC::Context&);
|
||||
Json::Value doUnlAdd (RPC::Context&);
|
||||
Json::Value doUnlDelete (RPC::Context&);
|
||||
Json::Value doUnlFetch (RPC::Context&);
|
||||
Json::Value doUnlList (RPC::Context&);
|
||||
Json::Value doUnlLoad (RPC::Context&);
|
||||
Json::Value doUnlNetwork (RPC::Context&);
|
||||
Json::Value doUnlReset (RPC::Context&);
|
||||
Json::Value doUnlScore (RPC::Context&);
|
||||
Json::Value doUnsubscribe (RPC::Context&);
|
||||
Json::Value doValidationCreate (RPC::Context&);
|
||||
Json::Value doValidationSeed (RPC::Context&);
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of rippled: https://github.com/ripple/rippled
|
||||
Copyright (c) 2012-2014 Ripple Labs Inc.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <BeastConfig.h>
|
||||
#include <ripple/basics/make_lock.h>
|
||||
#include <ripple/app/main/Application.h>
|
||||
#include <ripple/app/misc/ValidatorList.h>
|
||||
#include <ripple/json/json_value.h>
|
||||
#include <ripple/net/RPCErr.h>
|
||||
#include <ripple/protocol/ErrorCodes.h>
|
||||
#include <ripple/protocol/JsonFields.h>
|
||||
#include <ripple/protocol/PublicKey.h>
|
||||
#include <ripple/rpc/Context.h>
|
||||
#include <ripple/rpc/impl/Handler.h>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
// {
|
||||
// node: <node_public>,
|
||||
// comment: <comment> // optional
|
||||
// }
|
||||
Json::Value doUnlAdd (RPC::Context& context)
|
||||
{
|
||||
auto lock = make_lock(context.app.getMasterMutex());
|
||||
|
||||
if (!context.params.isMember (jss::node))
|
||||
return rpcError (rpcINVALID_PARAMS);
|
||||
|
||||
auto const id = parseBase58<PublicKey>(
|
||||
TokenType::TOKEN_NODE_PUBLIC,
|
||||
context.params[jss::node].asString ());
|
||||
|
||||
if (!id)
|
||||
return rpcError (rpcINVALID_PARAMS);
|
||||
|
||||
auto const added = context.app.validators().insertPermanentKey (
|
||||
*id,
|
||||
context.params.isMember (jss::comment)
|
||||
? context.params[jss::comment].asString ()
|
||||
: "");
|
||||
|
||||
Json::Value ret (Json::objectValue);
|
||||
ret[jss::pubkey_validator] = context.params[jss::node];
|
||||
ret[jss::status] = added ? "added" : "already present";
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // ripple
|
||||
@@ -1,59 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of rippled: https://github.com/ripple/rippled
|
||||
Copyright (c) 2012-2014 Ripple Labs Inc.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <BeastConfig.h>
|
||||
#include <ripple/app/main/Application.h>
|
||||
#include <ripple/app/misc/ValidatorList.h>
|
||||
#include <ripple/net/RPCErr.h>
|
||||
#include <ripple/protocol/JsonFields.h>
|
||||
#include <ripple/protocol/ErrorCodes.h>
|
||||
#include <ripple/protocol/PublicKey.h>
|
||||
#include <ripple/rpc/Context.h>
|
||||
#include <ripple/rpc/impl/Handler.h>
|
||||
#include <ripple/basics/make_lock.h>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
// {
|
||||
// node: <domain>|<public_key>
|
||||
// }
|
||||
Json::Value doUnlDelete (RPC::Context& context)
|
||||
{
|
||||
auto lock = make_lock(context.app.getMasterMutex());
|
||||
|
||||
if (!context.params.isMember (jss::node))
|
||||
return rpcError (rpcINVALID_PARAMS);
|
||||
|
||||
auto const id = parseBase58<PublicKey>(
|
||||
TokenType::TOKEN_NODE_PUBLIC,
|
||||
context.params[jss::node].asString ());
|
||||
|
||||
if (!id)
|
||||
return rpcError (rpcINVALID_PARAMS);
|
||||
|
||||
auto const removed =
|
||||
context.app.validators().removePermanentKey (*id);
|
||||
|
||||
Json::Value ret (Json::objectValue);
|
||||
ret[jss::pubkey_validator] = context.params[jss::node];
|
||||
ret[jss::status] = removed ? "removed" : "not present";
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // ripple
|
||||
@@ -149,8 +149,6 @@ Handler handlerArray[] {
|
||||
{ "transaction_entry", byRef (&doTransactionEntry), Role::USER, NO_CONDITION },
|
||||
{ "tx", byRef (&doTx), Role::USER, NEEDS_NETWORK_CONNECTION },
|
||||
{ "tx_history", byRef (&doTxHistory), Role::USER, NO_CONDITION },
|
||||
{ "unl_add", byRef (&doUnlAdd), Role::ADMIN, NO_CONDITION },
|
||||
{ "unl_delete", byRef (&doUnlDelete), Role::ADMIN, NO_CONDITION },
|
||||
{ "unl_list", byRef (&doUnlList), Role::ADMIN, NO_CONDITION },
|
||||
{ "validation_create", byRef (&doValidationCreate), Role::ADMIN, NO_CONDITION },
|
||||
{ "validation_seed", byRef (&doValidationSeed), Role::ADMIN, NO_CONDITION },
|
||||
|
||||
@@ -80,8 +80,6 @@
|
||||
#include <ripple/rpc/handlers/TransactionEntry.cpp>
|
||||
#include <ripple/rpc/handlers/Tx.cpp>
|
||||
#include <ripple/rpc/handlers/TxHistory.cpp>
|
||||
#include <ripple/rpc/handlers/UnlAdd.cpp>
|
||||
#include <ripple/rpc/handlers/UnlDelete.cpp>
|
||||
#include <ripple/rpc/handlers/UnlList.cpp>
|
||||
#include <ripple/rpc/handlers/Unsubscribe.cpp>
|
||||
#include <ripple/rpc/handlers/ValidationCreate.cpp>
|
||||
|
||||
Reference in New Issue
Block a user