Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Builds/CMake/RippledCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ target_sources (xrpl_core PRIVATE
src/ripple/beast/insight/impl/Metric.cpp
src/ripple/beast/insight/impl/NullCollector.cpp
src/ripple/beast/insight/impl/StatsDCollector.cpp
src/ripple/beast/net/impl/IPAddressConversion.cpp
src/ripple/beast/net/impl/IPAddressV4.cpp
src/ripple/beast/net/impl/IPAddressV6.cpp
src/ripple/beast/net/impl/IPEndpoint.cpp
src/ripple/beast/utility/src/beast_Journal.cpp
src/ripple/beast/utility/src/beast_PropertyStream.cpp
Expand All @@ -62,7 +59,6 @@ target_sources (xrpl_core PRIVATE
#]===============================]
src/ripple/basics/impl/base64.cpp
src/ripple/basics/impl/contract.cpp
src/ripple/basics/impl/CountedObject.cpp
src/ripple/basics/impl/FileUtilities.cpp
src/ripple/basics/impl/IOUAmount.cpp
src/ripple/basics/impl/Log.cpp
Expand All @@ -78,7 +74,6 @@ target_sources (xrpl_core PRIVATE
src/ripple/json/impl/Writer.cpp
src/ripple/json/impl/json_reader.cpp
src/ripple/json/impl/json_value.cpp
src/ripple/json/impl/json_valueiterator.cpp
src/ripple/json/impl/json_writer.cpp
src/ripple/json/impl/to_string.cpp
#[===============================[
Expand Down Expand Up @@ -817,7 +812,6 @@ if (tests)
src/test/basics/base_uint_test.cpp
src/test/basics/contract_test.cpp
src/test/basics/FeeUnits_test.cpp
src/test/basics/hardened_hash_test.cpp
src/test/basics/join_test.cpp
src/test/basics/mulDiv_test.cpp
src/test/basics/tagged_integer_test.cpp
Expand Down Expand Up @@ -865,7 +859,6 @@ if (tests)
src/test/core/CryptoPRNG_test.cpp
src/test/core/JobQueue_test.cpp
src/test/core/SociDB_test.cpp
src/test/core/Workers_test.cpp
#[===============================[
test sources:
subdir: csf
Expand Down
1 change: 0 additions & 1 deletion Builds/levelization/results/ordering.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ test.core > ripple.basics
test.core > ripple.beast
test.core > ripple.core
test.core > ripple.crypto
test.core > ripple.json
test.core > ripple.server
test.core > test.jtx
test.core > test.toplevel
Expand Down
9 changes: 4 additions & 5 deletions src/ripple/app/consensus/RCLConsensus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,9 @@ RCLConsensus::Adaptor::share(RCLTxSet const& txns)
std::optional<RCLTxSet>
RCLConsensus::Adaptor::acquireTxSet(RCLTxSet::ID const& setId)
{
if (auto txns = inboundTransactions_.getSet(setId, true))
{
if (auto txns = inboundTransactions_.acquire(setId))
return RCLTxSet{std::move(txns)};
}

return std::nullopt;
}

Expand Down Expand Up @@ -688,8 +687,8 @@ RCLConsensus::Adaptor::doAccept(

for (auto const& [t, v] : rawCloseTimes.peers)
{
JLOG(j_.info()) << std::to_string(v) << " time votes for "
<< std::to_string(t.time_since_epoch().count());
JLOG(j_.debug())
<< v << " time votes for " << t.time_since_epoch().count();
closeCount += v;
closeTotal +=
std::chrono::duration_cast<usec64_t>(t.time_since_epoch()) * v;
Expand Down
2 changes: 1 addition & 1 deletion src/ripple/app/consensus/RCLConsensus.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#include <ripple/consensus/Consensus.h>
#include <ripple/core/JobQueue.h>
#include <ripple/overlay/Message.h>
#include <ripple/protocol/RippleLedgerHash.h>
#include <ripple/protocol/STValidation.h>
#include <ripple/protocol/UintTypes.h>
#include <ripple/shamap/SHAMap.h>
#include <atomic>
#include <mutex>
Expand Down
2 changes: 1 addition & 1 deletion src/ripple/app/consensus/RCLCxLedger.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <ripple/app/ledger/Ledger.h>
#include <ripple/app/ledger/LedgerToJson.h>
#include <ripple/ledger/ReadView.h>
#include <ripple/protocol/RippleLedgerHash.h>
#include <ripple/protocol/UintTypes.h>
#include <memory>

namespace ripple {
Expand Down
2 changes: 1 addition & 1 deletion src/ripple/app/consensus/RCLValidations.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <ripple/app/ledger/Ledger.h>
#include <ripple/consensus/Validations.h>
#include <ripple/protocol/Protocol.h>
#include <ripple/protocol/RippleLedgerHash.h>
#include <ripple/protocol/STValidation.h>
#include <ripple/protocol/UintTypes.h>
#include <optional>
#include <set>
#include <vector>
Expand Down
26 changes: 3 additions & 23 deletions src/ripple/app/ledger/InboundLedger.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,10 @@ class InboundLedger final : public TimeoutCounter,
void
update(std::uint32_t seq);

/** Returns true if we got all the data. */
bool
isComplete() const
{
return complete_;
}

/** Returns false if we failed to get the data. */
bool
isFailed() const
{
return failed_;
}

std::shared_ptr<Ledger const>
getLedger() const
{
return mLedger;
return ledger_;
}

std::uint32_t
Expand Down Expand Up @@ -175,14 +161,9 @@ class InboundLedger final : public TimeoutCounter,
clock_type& m_clock;
clock_type::time_point mLastAction;

std::shared_ptr<Ledger> mLedger;
bool mHaveHeader;
bool mHaveState;
bool mHaveTransactions;
bool mSignaled;
bool mByHash;
std::shared_ptr<Ledger> ledger_;
std::uint32_t mSeq;
Reason const mReason;
Reason const reason_;

std::set<uint256> mRecentNodes;

Expand All @@ -193,7 +174,6 @@ class InboundLedger final : public TimeoutCounter,
std::vector<
std::pair<std::weak_ptr<Peer>, std::shared_ptr<protocol::TMLedgerData>>>
mReceivedData;
bool mReceiveDispatched;
std::unique_ptr<PeerSet> mPeerSet;
};

Expand Down
2 changes: 1 addition & 1 deletion src/ripple/app/ledger/InboundLedgers.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define RIPPLE_APP_LEDGER_INBOUNDLEDGERS_H_INCLUDED

#include <ripple/app/ledger/InboundLedger.h>
#include <ripple/protocol/RippleLedgerHash.h>
#include <ripple/protocol/UintTypes.h>
#include <memory>

namespace ripple {
Expand Down
29 changes: 19 additions & 10 deletions src/ripple/app/ledger/InboundTransactions.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,39 @@ class InboundTransactions
InboundTransactions&
operator=(InboundTransactions const&) = delete;

virtual ~InboundTransactions() = 0;
virtual ~InboundTransactions() = default;

/** Find and return a transaction set, or nullptr if it is missing.
/** Retrieve a transaction set if it is available locally.
*
* @param setHash The transaction set ID (digest of the SHAMap root node).
* @param acquire Whether to fetch the transaction set from the network if
* it is missing.
* @return The transaction set with ID setHash, or nullptr if it is
* missing.
* @param hash The transaction set ID (digest of the SHAMap root node).
* @return The transaction set, or nullptr if not available.
*/
virtual std::shared_ptr<SHAMap>
get(uint256 const& hash) = 0;

/** Retrieve a transaction set, fetching it from the network if necessary.
*
* If the transaction set is not available locally, initiates acquisition
* from peers and returns nullptr. The set will be delivered asynchronously
* via the callback when available.
*
* @param hash The transaction set ID (digest of the SHAMap root node).
* @return The transaction set if available locally, otherwise nullptr.
*/
virtual std::shared_ptr<SHAMap>
getSet(uint256 const& setHash, bool acquire) = 0;
acquire(uint256 const& hash) = 0;

/** Add a transaction set from a LedgerData message.
*
* @param setHash The transaction set ID (digest of the SHAMap root node).
* @param peer The peer that sent the message.
* @param message The LedgerData message.
* @param data The data we received.
*/
virtual void
gotData(
uint256 const& setHash,
std::shared_ptr<Peer> peer,
std::shared_ptr<protocol::TMLedgerData> message) = 0;
std::vector<std::pair<SHAMapNodeID, Slice>> const& data) = 0;

/** Add a transaction set.
*
Expand Down
2 changes: 1 addition & 1 deletion src/ripple/app/ledger/LedgerHistory.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <ripple/app/main/Application.h>
#include <ripple/beast/insight/Collector.h>
#include <ripple/beast/insight/Event.h>
#include <ripple/protocol/RippleLedgerHash.h>
#include <ripple/protocol/UintTypes.h>

#include <optional>

Expand Down
2 changes: 1 addition & 1 deletion src/ripple/app/ledger/LedgerMaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#include <ripple/basics/chrono.h>
#include <ripple/beast/insight/Collector.h>
#include <ripple/protocol/Protocol.h>
#include <ripple/protocol/RippleLedgerHash.h>
#include <ripple/protocol/STValidation.h>
#include <ripple/protocol/UintTypes.h>
#include <ripple/protocol/messages.h>
#include <optional>

Expand Down
3 changes: 2 additions & 1 deletion src/ripple/app/ledger/LedgerReplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ std::uint32_t constexpr SUB_TASK_MAX_TIMEOUTS = 10;

// max number of peers that do not support the ledger replay feature
// returned by the PeerSet before switch to fallback
auto constexpr MAX_NO_FEATURE_PEER_COUNT = 2;
std::uint8_t constexpr MAX_NO_FEATURE_PEER_COUNT = 2;

// subtask timeout value after fallback
auto constexpr SUB_TASK_FALLBACK_TIMEOUT = std::chrono::milliseconds{1000};

Expand Down
2 changes: 1 addition & 1 deletion src/ripple/app/ledger/TransactionMaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class TransactionMaster

std::shared_ptr<STTx const>
fetch(
boost::intrusive_ptr<SHAMapItem> const& item,
boost::intrusive_ptr<SHAMapItem const> const& item,
SHAMapNodeType type,
std::uint32_t uCommitLedger);

Expand Down
Loading
Loading