Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ximinez committed Aug 9, 2024
1 parent 984827a commit 674214d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 30 deletions.
3 changes: 1 addition & 2 deletions src/ripple/app/ledger/InboundLedger.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ class InboundLedger final : public TimeoutCounter,
std::unique_ptr<PeerSet> mPeerSet;
};

inline
std::string
inline std::string
to_string(InboundLedger::Reason reason)
{
using enum InboundLedger::Reason;
Expand Down
17 changes: 7 additions & 10 deletions src/ripple/app/ledger/impl/InboundLedgers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,13 @@ class InboundLedgersImp : public InboundLedgers
(seq > validSeq) && (seq < validSeq + lagLeeway);
bool const shouldAcquire = !(isFull && !fallingBehind && nearFuture);
ss << " Evaluating whether to acquire ledger " << hash
<< ". full: " << (isFull ? "true" : "false")
<< ". falling behind: "
<< (fallingBehind ? "true" : "false")
<< ". ledger sequence " << seq
<< ". Valid sequence: " << validSeq
<< ". Lag leeway: " << lagLeeway
<< ". request for near future ledger: "
<< (nearFuture ? "true" : "false")
<< ". Acquiring ledger? "
<< (shouldAcquire ? "true" : "false");
<< ". full: " << (isFull ? "true" : "false")
<< ". falling behind: " << (fallingBehind ? "true" : "false")
<< ". ledger sequence " << seq << ". Valid sequence: " << validSeq
<< ". Lag leeway: " << lagLeeway
<< ". request for near future ledger: "
<< (nearFuture ? "true" : "false") << ". Acquiring ledger? "
<< (shouldAcquire ? "true" : "false");
if (!shouldAcquire)
{
JLOG(j_.debug()) << "Abort (rule): " << ss.str();
Expand Down
12 changes: 5 additions & 7 deletions src/ripple/consensus/ConsensusProposal.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include <ripple/protocol/HashPrefix.h>
#include <ripple/protocol/jss.h>
#include <cstdint>
#include <sstream>
#include <optional>
#include <sstream>

namespace ripple {
/** Represents a proposed position taken during a round of consensus.
Expand Down Expand Up @@ -200,12 +200,10 @@ class ConsensusProposal
{
std::stringstream ss;
ss << "proposal: previous_ledger: " << previousLedger_
<< " proposal_seq: " << proposeSeq_
<< " position: " << position_
<< " close_time: " << to_string(closeTime_)
<< " now: " << to_string(time_)
<< " is_bow_out:" << isBowOut()
<< " node_id: " << nodeID_;
<< " proposal_seq: " << proposeSeq_ << " position: " << position_
<< " close_time: " << to_string(closeTime_)
<< " now: " << to_string(time_) << " is_bow_out:" << isBowOut()
<< " node_id: " << nodeID_;
return ss.str();
}

Expand Down
20 changes: 9 additions & 11 deletions src/ripple/protocol/STValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,15 @@ class STValidation final : public STObject, public CountedObject<STValidation>
{
std::stringstream ss;
ss << "validation: "
<< " ledger_hash: " << getLedgerHash()
<< " consensus_hash: " << getConsensusHash()
<< " sign_time: " << to_string(getSignTime())
<< " seen_time: " << to_string(getSeenTime())
<< " signer_public_key: " << getSignerPublic()
<< " node_id: " << getNodeID()
<< " is_valid: " << isValid()
<< " is_full: " << isFull()
<< " is_trusted: " << isTrusted()
<< " signing_hash: " << getSigningHash()
<< " base58: " << toBase58(TokenType::NodePublic, getSignerPublic());
<< " ledger_hash: " << getLedgerHash()
<< " consensus_hash: " << getConsensusHash()
<< " sign_time: " << to_string(getSignTime())
<< " seen_time: " << to_string(getSeenTime())
<< " signer_public_key: " << getSignerPublic()
<< " node_id: " << getNodeID() << " is_valid: " << isValid()
<< " is_full: " << isFull() << " is_trusted: " << isTrusted()
<< " signing_hash: " << getSigningHash()
<< " base58: " << toBase58(TokenType::NodePublic, getSignerPublic());
return ss.str();
}

Expand Down

0 comments on commit 674214d

Please sign in to comment.