Skip to content

Commit

Permalink
Revert " Price Oracle (XLS-47d): (XRPLF#4789) (XRPLF#4789)"
Browse files Browse the repository at this point in the history
This reverts commit e718378 in order to add input validation
in get_aggregate_price and make consistent error handling in Oracle
API's.
  • Loading branch information
gregtatcam committed Apr 29, 2024
1 parent 02ec8b7 commit 6b1ed8f
Show file tree
Hide file tree
Showing 41 changed files with 7 additions and 2,865 deletions.
7 changes: 0 additions & 7 deletions Builds/CMake/RippledCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ target_sources (xrpl_core PRIVATE
src/ripple/protocol/impl/STArray.cpp
src/ripple/protocol/impl/STBase.cpp
src/ripple/protocol/impl/STBlob.cpp
src/ripple/protocol/impl/STCurrency.cpp
src/ripple/protocol/impl/STInteger.cpp
src/ripple/protocol/impl/STLedgerEntry.cpp
src/ripple/protocol/impl/STObject.cpp
Expand Down Expand Up @@ -614,7 +613,6 @@ target_sources (rippled PRIVATE
src/ripple/app/tx/impl/CreateOffer.cpp
src/ripple/app/tx/impl/CreateTicket.cpp
src/ripple/app/tx/impl/DeleteAccount.cpp
src/ripple/app/tx/impl/DeleteOracle.cpp
src/ripple/app/tx/impl/DepositPreauth.cpp
src/ripple/app/tx/impl/DID.cpp
src/ripple/app/tx/impl/Escrow.cpp
Expand All @@ -628,7 +626,6 @@ target_sources (rippled PRIVATE
src/ripple/app/tx/impl/PayChan.cpp
src/ripple/app/tx/impl/Payment.cpp
src/ripple/app/tx/impl/SetAccount.cpp
src/ripple/app/tx/impl/SetOracle.cpp
src/ripple/app/tx/impl/SetRegularKey.cpp
src/ripple/app/tx/impl/SetSignerList.cpp
src/ripple/app/tx/impl/SetTrust.cpp
Expand Down Expand Up @@ -764,7 +761,6 @@ target_sources (rippled PRIVATE
src/ripple/rpc/handlers/FetchInfo.cpp
src/ripple/rpc/handlers/GatewayBalances.cpp
src/ripple/rpc/handlers/GetCounts.cpp
src/ripple/rpc/handlers/GetAggregatePrice.cpp
src/ripple/rpc/handlers/LedgerAccept.cpp
src/ripple/rpc/handlers/LedgerCleanerHandler.cpp
src/ripple/rpc/handlers/LedgerClosed.cpp
Expand Down Expand Up @@ -878,7 +874,6 @@ if (tests)
src/test/app/NFTokenDir_test.cpp
src/test/app/OfferStream_test.cpp
src/test/app/Offer_test.cpp
src/test/app/Oracle_test.cpp
src/test/app/OversizeMeta_test.cpp
src/test/app/Path_test.cpp
src/test/app/PayChan_test.cpp
Expand Down Expand Up @@ -1003,7 +998,6 @@ if (tests)
src/test/jtx/impl/AMMTest.cpp
src/test/jtx/impl/Env.cpp
src/test/jtx/impl/JSONRPCClient.cpp
src/test/jtx/impl/Oracle.cpp
src/test/jtx/impl/TestHelpers.cpp
src/test/jtx/impl/WSClient.cpp
src/test/jtx/impl/acctdelete.cpp
Expand Down Expand Up @@ -1131,7 +1125,6 @@ if (tests)
src/test/rpc/DeliveredAmount_test.cpp
src/test/rpc/Feature_test.cpp
src/test/rpc/GatewayBalances_test.cpp
src/test/rpc/GetAggregatePrice_test.cpp
src/test/rpc/GetCounts_test.cpp
src/test/rpc/JSONRPC_test.cpp
src/test/rpc/KeyGeneration_test.cpp
Expand Down
15 changes: 0 additions & 15 deletions src/ripple/app/tx/impl/DeleteAccount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include <ripple/app/tx/impl/DID.h>
#include <ripple/app/tx/impl/DeleteAccount.h>
#include <ripple/app/tx/impl/DeleteOracle.h>
#include <ripple/app/tx/impl/DepositPreauth.h>
#include <ripple/app/tx/impl/SetSignerList.h>
#include <ripple/app/tx/impl/details/NFTokenUtils.h>
Expand Down Expand Up @@ -147,18 +146,6 @@ removeDIDFromLedger(
return DIDDelete::deleteSLE(view, sleDel, account, j);
}

TER
removeOracleFromLedger(
Application&,
ApplyView& view,
AccountID const& account,
uint256 const&,
std::shared_ptr<SLE> const& sleDel,
beast::Journal j)
{
return DeleteOracle::deleteOracle(view, sleDel, account, j);
}

// Return nullptr if the LedgerEntryType represents an obligation that can't
// be deleted. Otherwise return the pointer to the function that can delete
// the non-obligation
Expand All @@ -179,8 +166,6 @@ nonObligationDeleter(LedgerEntryType t)
return removeNFTokenOfferFromLedger;
case ltDID:
return removeDIDFromLedger;
case ltORACLE:
return removeOracleFromLedger;
default:
return nullptr;
}
Expand Down
110 changes: 0 additions & 110 deletions src/ripple/app/tx/impl/DeleteOracle.cpp

This file was deleted.

64 changes: 0 additions & 64 deletions src/ripple/app/tx/impl/DeleteOracle.h

This file was deleted.

1 change: 0 additions & 1 deletion src/ripple/app/tx/impl/InvariantCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ LedgerEntryTypesMatch::visitEntry(
case ltXCHAIN_OWNED_CLAIM_ID:
case ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID:
case ltDID:
case ltORACLE:
break;
default:
invalidTypeAdded_ = true;
Expand Down
Loading

0 comments on commit 6b1ed8f

Please sign in to comment.