mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-22 03:55:53 +00:00
Rearrange branch in accordance with new practices.
This commit is contained in:
committed by
Vinnie Falco
parent
526bd88dc4
commit
39719f4c17
@@ -17,8 +17,6 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <ripple/module/rpc/impl/Handlers.cpp>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
//
|
||||
|
||||
@@ -43,15 +43,12 @@ Json::Value RPCHandler::doLedgerGet (
|
||||
"Exactly one of ledger_hash and ledger_index can be set.");
|
||||
}
|
||||
|
||||
if (hasHas)
|
||||
if (hasHash)
|
||||
{
|
||||
auto const& jsonHash = params[jss::ledger_hash];
|
||||
if (!jsonHash.isString() || !ledgerHash.SetHex (jsonHash.asString ()))
|
||||
return RPC::invalid_field_message ("ledger_hash");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
} else {
|
||||
auto const& jsonIndex = params[jss::ledger_index];
|
||||
if (!jsonIndex.isNumeric ())
|
||||
return RPC::invalid_field_message ("ledger_index");
|
||||
@@ -69,7 +66,7 @@ Json::Value RPCHandler::doLedgerGet (
|
||||
// Try to get the hash of the desired ledger from the validated ledger
|
||||
ledgerHash = ledger->getLedgerHash (ledgerIndex);
|
||||
|
||||
if (ledgerHash.isZero ())
|
||||
if (ledgerHash == zero)
|
||||
{
|
||||
// Find a ledger more likely to have the hash of the desired ledger
|
||||
auto refIndex = (ledgerIndex + 255) & (~255);
|
||||
@@ -79,8 +76,8 @@ Json::Value RPCHandler::doLedgerGet (
|
||||
ledger = ledgerMaster.getLedgerByHash (refHash);
|
||||
if (!ledger)
|
||||
{
|
||||
// We don't have the ledger we need to figure out whihc
|
||||
// ledger they want. Try to get it.
|
||||
// We don't have the ledger we need to figure out which ledger
|
||||
// they want. Try to get it.
|
||||
getApp().getInboundLedgers().findCreate (
|
||||
refHash, refIndex, InboundLedger::fcGENERIC);
|
||||
|
||||
@@ -92,7 +89,6 @@ Json::Value RPCHandler::doLedgerGet (
|
||||
ledgerHash = ledger->getLedgerHash (ledgerIndex);
|
||||
assert (ledgerHash.isNonZero ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
auto ledger = ledgerMaster.getLedgerByHash (ledgerHash);
|
||||
@@ -111,7 +107,6 @@ Json::Value RPCHandler::doLedgerGet (
|
||||
ledgerHash, 0, InboundLedger::fcGENERIC);
|
||||
return il->getJson (0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // ripple
|
||||
@@ -17,10 +17,10 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <ripple/module/app/misc/ProofOfWorkFactory.h>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
|
||||
// {
|
||||
// // if either of these parameters is set, a custom generator is used
|
||||
// difficulty: <number> // optional
|
||||
|
||||
@@ -1,91 +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 <ripple/module/rpc/handlers/AccountCurrencies.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountLines.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountOffers.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountTx.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountTxOld.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountTxSwitch.cpp>
|
||||
#include <ripple/module/rpc/handlers/BlackList.cpp>
|
||||
#include <ripple/module/rpc/handlers/BookOffers.cpp>
|
||||
#include <ripple/module/rpc/handlers/Connect.cpp>
|
||||
#include <ripple/module/rpc/handlers/ConsensusInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/Feature.cpp>
|
||||
#include <ripple/module/rpc/handlers/FetchInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/GetCounts.cpp>
|
||||
#include <ripple/module/rpc/handlers/Ledger.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerAccept.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerCleaner.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerClosed.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerCurrent.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerData.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerEntry.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerHeader.cpp>
|
||||
#include <ripple/module/rpc/handlers/LogLevel.cpp>
|
||||
#include <ripple/module/rpc/handlers/LogRotate.cpp>
|
||||
#include <ripple/module/rpc/handlers/NicknameInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/OwnerInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/PathFind.cpp>
|
||||
#include <ripple/module/rpc/handlers/Peers.cpp>
|
||||
#include <ripple/module/rpc/handlers/Ping.cpp>
|
||||
#include <ripple/module/rpc/handlers/Print.cpp>
|
||||
#include <ripple/module/rpc/handlers/Profile.cpp>
|
||||
#include <ripple/module/rpc/handlers/ProofCreate.cpp>
|
||||
#include <ripple/module/rpc/handlers/ProofSolve.cpp>
|
||||
#include <ripple/module/rpc/handlers/ProofVerify.cpp>
|
||||
#include <ripple/module/rpc/handlers/Random.cpp>
|
||||
#include <ripple/module/rpc/handlers/RipplePathFind.cpp>
|
||||
#include <ripple/module/rpc/handlers/SMS.cpp>
|
||||
#include <ripple/module/rpc/handlers/ServerInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/ServerState.cpp>
|
||||
#include <ripple/module/rpc/handlers/Sign.cpp>
|
||||
#include <ripple/module/rpc/handlers/Stop.cpp>
|
||||
#include <ripple/module/rpc/handlers/Submit.cpp>
|
||||
#include <ripple/module/rpc/handlers/Subscribe.cpp>
|
||||
#include <ripple/module/rpc/handlers/TransactionEntry.cpp>
|
||||
#include <ripple/module/rpc/handlers/Tx.cpp>
|
||||
#include <ripple/module/rpc/handlers/TxHistory.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlAdd.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlDelete.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlList.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlLoad.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlNetwork.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlReset.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlScore.cpp>
|
||||
#include <ripple/module/rpc/handlers/Unsubscribe.cpp>
|
||||
#include <ripple/module/rpc/handlers/ValidationCreate.cpp>
|
||||
#include <ripple/module/rpc/handlers/ValidationSeed.cpp>
|
||||
#include <ripple/module/rpc/handlers/WalletAccounts.cpp>
|
||||
#include <ripple/module/rpc/handlers/WalletPropose.cpp>
|
||||
#include <ripple/module/rpc/handlers/WalletSeed.cpp>
|
||||
|
||||
#include <ripple/module/rpc/impl/AccountFromString.cpp>
|
||||
#include <ripple/module/rpc/impl/Accounts.cpp>
|
||||
#include <ripple/module/rpc/impl/Authorize.cpp>
|
||||
#include <ripple/module/rpc/impl/GetMasterGenerator.cpp>
|
||||
#include <ripple/module/rpc/impl/LegacyPathFind.cpp>
|
||||
#include <ripple/module/rpc/impl/LookupLedger.cpp>
|
||||
#include <ripple/module/rpc/impl/ParseAccountIds.cpp>
|
||||
#include <ripple/module/rpc/impl/TransactionSign.cpp>
|
||||
|
||||
#include <ripple/module/overlay/api/Overlay.h>
|
||||
#include <tuple>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
//==============================================================================
|
||||
|
||||
#include <ripple/module/rpc/impl/TransactionSign.h>
|
||||
#include <beast/unit_test.h>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
|
||||
@@ -19,12 +19,86 @@
|
||||
|
||||
#include <BeastConfig.h>
|
||||
|
||||
#include <ripple/unity/rpcx.h>
|
||||
|
||||
// Unfortunate but necessary since RPC handlers can literally do anything
|
||||
#include <ripple/unity/app.h>
|
||||
#include <ripple/unity/json.h>
|
||||
#include <ripple/common/jsonrpc_fields.h>
|
||||
|
||||
#include <ripple/unity/rpcx.h>
|
||||
|
||||
#include <ripple/module/app/rpc/RPCHandler.h>
|
||||
#include <ripple/module/overlay/api/Overlay.h>
|
||||
#include <tuple>
|
||||
|
||||
#include <ripple/module/rpc/impl/ErrorCodes.cpp>
|
||||
#include <ripple/module/rpc/impl/Manager.cpp>
|
||||
|
||||
#include <ripple/module/rpc/handlers/AccountCurrencies.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountLines.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountOffers.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountTx.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountTxOld.cpp>
|
||||
#include <ripple/module/rpc/handlers/AccountTxSwitch.cpp>
|
||||
#include <ripple/module/rpc/handlers/BlackList.cpp>
|
||||
#include <ripple/module/rpc/handlers/BookOffers.cpp>
|
||||
#include <ripple/module/rpc/handlers/Connect.cpp>
|
||||
#include <ripple/module/rpc/handlers/ConsensusInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/Feature.cpp>
|
||||
#include <ripple/module/rpc/handlers/FetchInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/GetCounts.cpp>
|
||||
#include <ripple/module/rpc/handlers/Ledger.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerAccept.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerCleaner.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerClosed.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerCurrent.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerData.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerEntry.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerGet.cpp>
|
||||
#include <ripple/module/rpc/handlers/LedgerHeader.cpp>
|
||||
#include <ripple/module/rpc/handlers/LogLevel.cpp>
|
||||
#include <ripple/module/rpc/handlers/LogRotate.cpp>
|
||||
#include <ripple/module/rpc/handlers/NicknameInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/OwnerInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/PathFind.cpp>
|
||||
#include <ripple/module/rpc/handlers/Peers.cpp>
|
||||
#include <ripple/module/rpc/handlers/Ping.cpp>
|
||||
#include <ripple/module/rpc/handlers/Print.cpp>
|
||||
#include <ripple/module/rpc/handlers/Profile.cpp>
|
||||
#include <ripple/module/rpc/handlers/ProofCreate.cpp>
|
||||
#include <ripple/module/rpc/handlers/ProofSolve.cpp>
|
||||
#include <ripple/module/rpc/handlers/ProofVerify.cpp>
|
||||
#include <ripple/module/rpc/handlers/Random.cpp>
|
||||
#include <ripple/module/rpc/handlers/RipplePathFind.cpp>
|
||||
#include <ripple/module/rpc/handlers/SMS.cpp>
|
||||
#include <ripple/module/rpc/handlers/ServerInfo.cpp>
|
||||
#include <ripple/module/rpc/handlers/ServerState.cpp>
|
||||
#include <ripple/module/rpc/handlers/Sign.cpp>
|
||||
#include <ripple/module/rpc/handlers/Stop.cpp>
|
||||
#include <ripple/module/rpc/handlers/Submit.cpp>
|
||||
#include <ripple/module/rpc/handlers/Subscribe.cpp>
|
||||
#include <ripple/module/rpc/handlers/TransactionEntry.cpp>
|
||||
#include <ripple/module/rpc/handlers/Tx.cpp>
|
||||
#include <ripple/module/rpc/handlers/TxHistory.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlAdd.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlDelete.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlList.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlLoad.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlNetwork.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlReset.cpp>
|
||||
#include <ripple/module/rpc/handlers/UnlScore.cpp>
|
||||
#include <ripple/module/rpc/handlers/Unsubscribe.cpp>
|
||||
#include <ripple/module/rpc/handlers/ValidationCreate.cpp>
|
||||
#include <ripple/module/rpc/handlers/ValidationSeed.cpp>
|
||||
#include <ripple/module/rpc/handlers/WalletAccounts.cpp>
|
||||
#include <ripple/module/rpc/handlers/WalletPropose.cpp>
|
||||
#include <ripple/module/rpc/handlers/WalletSeed.cpp>
|
||||
|
||||
#include <ripple/module/rpc/impl/AccountFromString.cpp>
|
||||
#include <ripple/module/rpc/impl/Accounts.cpp>
|
||||
#include <ripple/module/rpc/impl/Authorize.cpp>
|
||||
#include <ripple/module/rpc/impl/GetMasterGenerator.cpp>
|
||||
#include <ripple/module/rpc/impl/LegacyPathFind.cpp>
|
||||
#include <ripple/module/rpc/impl/LookupLedger.cpp>
|
||||
#include <ripple/module/rpc/impl/ParseAccountIds.cpp>
|
||||
#include <ripple/module/rpc/impl/TransactionSign.cpp>
|
||||
|
||||
@@ -1,91 +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 "../handlers/AccountCurrencies.cpp"
|
||||
#include "../handlers/AccountInfo.cpp"
|
||||
#include "../handlers/AccountLines.cpp"
|
||||
#include "../handlers/AccountOffers.cpp"
|
||||
#include "../handlers/AccountTx.cpp"
|
||||
#include "../handlers/AccountTxOld.cpp"
|
||||
#include "../handlers/AccountTxSwitch.cpp"
|
||||
#include "../handlers/BlackList.cpp"
|
||||
#include "../handlers/BookOffers.cpp"
|
||||
#include "../handlers/Connect.cpp"
|
||||
#include "../handlers/ConsensusInfo.cpp"
|
||||
#include "../handlers/Feature.cpp"
|
||||
#include "../handlers/FetchInfo.cpp"
|
||||
#include "../handlers/GetCounts.cpp"
|
||||
#include "../handlers/Ledger.cpp"
|
||||
#include "../handlers/LedgerAccept.cpp"
|
||||
#include "../handlers/LedgerCleaner.cpp"
|
||||
#include "../handlers/LedgerClosed.cpp"
|
||||
#include "../handlers/LedgerCurrent.cpp"
|
||||
#include "../handlers/LedgerData.cpp"
|
||||
#include "../handlers/LedgerEntry.cpp"
|
||||
#include "../handlers/LedgerHeader.cpp"
|
||||
#include "../handlers/LogLevel.cpp"
|
||||
#include "../handlers/LogRotate.cpp"
|
||||
#include "../handlers/NicknameInfo.cpp"
|
||||
#include "../handlers/OwnerInfo.cpp"
|
||||
#include "../handlers/PathFind.cpp"
|
||||
#include "../handlers/Peers.cpp"
|
||||
#include "../handlers/Ping.cpp"
|
||||
#include "../handlers/Print.cpp"
|
||||
#include "../handlers/Profile.cpp"
|
||||
#include "../handlers/ProofCreate.cpp"
|
||||
#include "../handlers/ProofSolve.cpp"
|
||||
#include "../handlers/ProofVerify.cpp"
|
||||
#include "../handlers/Random.cpp"
|
||||
#include "../handlers/RipplePathFind.cpp"
|
||||
#include "../handlers/SMS.cpp"
|
||||
#include "../handlers/ServerInfo.cpp"
|
||||
#include "../handlers/ServerState.cpp"
|
||||
#include "../handlers/Sign.cpp"
|
||||
#include "../handlers/Stop.cpp"
|
||||
#include "../handlers/Submit.cpp"
|
||||
#include "../handlers/Subscribe.cpp"
|
||||
#include "../handlers/TransactionEntry.cpp"
|
||||
#include "../handlers/Tx.cpp"
|
||||
#include "../handlers/TxHistory.cpp"
|
||||
#include "../handlers/UnlAdd.cpp"
|
||||
#include "../handlers/UnlDelete.cpp"
|
||||
#include "../handlers/UnlList.cpp"
|
||||
#include "../handlers/UnlLoad.cpp"
|
||||
#include "../handlers/UnlNetwork.cpp"
|
||||
#include "../handlers/UnlReset.cpp"
|
||||
#include "../handlers/UnlScore.cpp"
|
||||
#include "../handlers/Unsubscribe.cpp"
|
||||
#include "../handlers/ValidationCreate.cpp"
|
||||
#include "../handlers/ValidationSeed.cpp"
|
||||
#include "../handlers/WalletAccounts.cpp"
|
||||
#include "../handlers/WalletPropose.cpp"
|
||||
#include "../handlers/WalletSeed.cpp"
|
||||
|
||||
#include "AccountFromString.cpp"
|
||||
#include "Accounts.cpp"
|
||||
#include "Authorize.cpp"
|
||||
#include "GetMasterGenerator.cpp"
|
||||
#include "LegacyPathFind.cpp"
|
||||
#include "LookupLedger.cpp"
|
||||
#include "ParseAccountIds.cpp"
|
||||
#include "TransactionSign.cpp"
|
||||
|
||||
#include "../../ripple_overlay/api/Overlay.h"
|
||||
#include <tuple>
|
||||
|
||||
Reference in New Issue
Block a user