Remove trailing spaces.

This commit is contained in:
Tom Ritchford
2015-07-28 23:24:25 -04:00
committed by Nik Bougalis
parent 9e69bd5c56
commit 32ec3fe089
138 changed files with 881 additions and 884 deletions

View File

@@ -65,7 +65,7 @@ public:
{
return mMeta;
}
boost::container::flat_set<AccountID> const&
getAffected() const
{

View File

@@ -186,7 +186,7 @@ private:
ApplyFlags flags, IHashRouter& router,
Config const& config, beast::Journal j);
public:
public:
//--------------------------------------------------------------------------
//
// TEST CODE

View File

@@ -182,7 +182,7 @@ OpenLedger::verify (Ledger const& ledger,
return true;
JLOG(j_.error) <<
"verify ledger " << ledger.seq() << ": " <<
list1.size() << " / " << list2.size() <<
list1.size() << " / " << list2.size() <<
" " << " MISMATCH " << suffix;
return false;
#else

View File

@@ -134,7 +134,7 @@ TestAccount
createAccount(std::string const& passphrase, KeyType keyType);
TestAccount
createAndFundAccount(TestAccount& from, std::string const& passphrase,
createAndFundAccount(TestAccount& from, std::string const& passphrase,
KeyType keyType, std::uint64_t amountDrops,
Ledger::pointer const& ledger, bool sign = true);
@@ -239,8 +239,8 @@ trust(TestAccount& from, TestAccount const& issuer,
void
close_and_advance(Ledger::pointer& ledger, std::shared_ptr<Ledger const>& LCL);
Json::Value findPath(Ledger::pointer ledger, TestAccount const& src,
TestAccount const& dest, std::vector<Currency> srcCurrencies,
Json::Value findPath(Ledger::pointer ledger, TestAccount const& src,
TestAccount const& dest, std::vector<Currency> srcCurrencies,
Amount const& dstAmount, beast::abstract_ostream& log,
boost::optional<Json::Value> contextPaths = boost::none);

View File

@@ -900,7 +900,7 @@ Json::Value UniqueNodeListImp::getUnlJson()
auto db = getApp().getWalletDB ().checkoutDb ();
std::vector<std::array<boost::optional<std::string>, 2>> columns;
selectBlobsIntoStrings(*db,
"SELECT PublicKey, Comment FROM TrustedNodes;",
@@ -986,7 +986,7 @@ bool UniqueNodeListImp::miscLoad()
if (!db->got_data() )
return false;
mtpFetchUpdated = ptFromSeconds (fuO.value_or(-1));
mtpScoreUpdated = ptFromSeconds (suO.value_or(-1));
@@ -1147,7 +1147,7 @@ void UniqueNodeListImp::scoreCompute()
std::string const strSource = strArray[2].value_or("");
assert (!strSource.empty ());
int const iScore = iSourceScore (static_cast<ValidatorSource> (strSource[0]));
auto siOld = umPulicIdx.find (strPublicKey);
@@ -1269,7 +1269,7 @@ void UniqueNodeListImp::scoreCompute()
for(auto const& strArray : columns)
{
strReferral = strArray[0].value_or("");
int iReferral;
RippleAddress na;
@@ -1372,7 +1372,7 @@ void UniqueNodeListImp::scoreCompute()
for(auto const& col : columns)
{
pk = get<0>(col).value_or ("");
vsnNodes[umPulicIdx[pk]].iSeen = get<1>(col).value_or (-1);
}
}

View File

@@ -136,7 +136,7 @@ private:
AccountID const& account,
Currency const& currency,
AccountID const& issuer);
Json::Value getJson () const;
private:
@@ -157,7 +157,7 @@ private:
bool allLiquidityConsumed_ = false;
TER terStatus;
path::Node::List nodes_;
// When processing, don't want to complicate directory walking with

View File

@@ -72,7 +72,7 @@ public:
};
static
static
Output
rippleCalculate(
PaymentSandbox& view,

View File

@@ -60,7 +60,6 @@ doapply(OpenView& view, STTx const& tx,
/** Apply a transaction to a ReadView.
Throws:
Does not throw.
For open ledgers, the Transactor will catch and

View File

@@ -182,7 +182,7 @@ public:
bool fromAcquire) override
{
bool isNew = true;
{
ScopedLockType sl (mLock);

View File

@@ -40,7 +40,7 @@ using weeks = std::chrono::duration
days::period, std::ratio<7>>>;
/** Clock for measuring Ripple Network Time.
The epoch is January 1, 2000
*/
// VFALCO TODO Finish the implementation and make

View File

@@ -416,7 +416,7 @@ void Config::loadFromString (std::string const& fileContents)
if (getSingleSection (secConfig, "database_path", dbPath))
{
boost::filesystem::path p(dbPath);
legacy("database_path",
legacy("database_path",
boost::filesystem::absolute (p).string ());
}
}

View File

@@ -183,7 +183,7 @@ public:
return when;
return when + std::chrono::seconds(offset_);
}
duration
offset() const override
{
@@ -198,7 +198,7 @@ public:
setCallingThreadName("SNTPClock");
io_service_.run();
}
void
onTimer (error_code const& ec)
{

View File

@@ -35,7 +35,7 @@ class SNTPClock
std::chrono::system_clock>
{
public:
virtual
virtual
void
run (std::vector <std::string> const& servers) = 0;

View File

@@ -232,7 +232,7 @@ public:
// There are too many issues when working with soci::row and boost::tuple. DO NOT USE
// soci row! I had a set of workarounds to make soci row less error prone, I'm keeping
// these tests in case I try to add soci::row and boost::tuple back into soci.
#if 0
#if 0
try
{
std::int32_t ig = 0;
@@ -285,7 +285,7 @@ public:
{
fail ();
}
#endif
#endif
}
{
using namespace boost::filesystem;

View File

@@ -44,7 +44,7 @@ public:
destroy();
}
bool valid() const
bool valid() const
{
return ptr != nullptr;
}

View File

@@ -94,7 +94,7 @@ public:
STObject& getAffectedNode (SLE::ref node, SField const& type); // create if needed
STObject& getAffectedNode (uint256 const& );
const STObject& peekAffectedNode (uint256 const& ) const;
/** Return a list of accounts affected by this transaction */
boost::container::flat_set<AccountID>
getAffectedAccounts() const;

View File

@@ -84,7 +84,7 @@ private:
insert,
replace,
};
using items_t = std::map<key_type,
std::pair<Action, std::shared_ptr<SLE>>>;

View File

@@ -361,7 +361,7 @@ class View_test
expect(v2.parentCloseTime() ==
v1.parentCloseTime());
expect(v2.seq() == v1.seq());
expect(v2.flags() == tapNO_CHECK_SIGN);
expect(v2.flags() == tapNO_CHECK_SIGN);
Sandbox v3(&v2);
expect(v3.seq() == v2.seq());
@@ -375,7 +375,7 @@ class View_test
expect(v2.seq() == v0.seq());
expect(v2.parentCloseTime() ==
v0.parentCloseTime());
expect(v2.flags() == tapNO_CHECK_SIGN);
expect(v2.flags() == tapNO_CHECK_SIGN);
PaymentSandbox v3(&v2);
expect(v3.seq() == v2.seq());
expect(v3.parentCloseTime() ==

View File

@@ -54,7 +54,7 @@ public:
or paths used by the underlying backend.
*/
virtual std::string getName () const = 0;
/** Close the database.
This allows the caller to catch exceptions.
*/

View File

@@ -39,8 +39,8 @@ enum NodeObjectType
/** A simple object that the Ledger uses to store entries.
NodeObjects are comprised of a type, a hash, a ledger index and a blob.
They can be uniquely identified by the hash, which is a half-SHA512 of
the blob. The blob is a variable length block of serialized data. The
They can be uniquely identified by the hash, which is a half-SHA512 of
the blob. The blob is a variable length block of serialized data. The
type identifies what the blob contains.
@note No checking is performed to make sure the hash matches the data.

View File

@@ -19,7 +19,7 @@
#include <BeastConfig.h>
#include <ripple/nodestore/impl/BatchWriter.h>
namespace ripple {
namespace NodeStore {

View File

@@ -20,7 +20,7 @@
#include <BeastConfig.h>
#include <ripple/nodestore/impl/EncodedBlob.h>
#include <beast/ByteOrder.h>
namespace ripple {
namespace NodeStore {

View File

@@ -112,7 +112,7 @@ public:
{
gen_.seed(n+1);
uint256 key;
auto const data =
auto const data =
static_cast<std::uint8_t*>(&*key.begin());
*data = prefix_;
rngcpy (data + 1, key.size() - 1, gen_);
@@ -508,7 +508,7 @@ public:
}
}
};
try
{
parallel_for_id<Body>(params.items, params.threads,

View File

@@ -331,7 +331,7 @@ public:
"Missing parameter: buffer";
usage = true;
}
if (usage)
{
log <<
@@ -603,7 +603,7 @@ public:
"Missing parameter: buffer";
usage = true;
}
if (usage)
{
log <<
@@ -919,7 +919,7 @@ public:
"Missing parameter: path";
usage = true;
}
if (usage)
{
log <<

View File

@@ -97,7 +97,7 @@ public:
@return `true` If the peer was added
*/
bool insert (Peer::ptr const&);
virtual bool isDone () const
{
return mComplete || mFailed;

View File

@@ -22,7 +22,7 @@
#include <ripple/overlay/impl/PeerImp.h>
#include <ripple/overlay/impl/Tuning.h>
#include <ripple/json/json_reader.h>
namespace ripple {
ConnectAttempt::ConnectAttempt (boost::asio::io_service& io_service,

View File

@@ -126,7 +126,7 @@ public:
testcase ("load/store");
std::string const dbName("ManifestCacheTestDB");
{
{
// create a database, save the manifest to the db and reload and
// check that the manifest caches are the same
DatabaseCon::Setup setup;

View File

@@ -28,7 +28,7 @@ namespace ripple {
class STLedgerEntry;
/** A pair of SHAMap key and LedgerEntryType.
A Keylet identifies both a key in the state map
and its ledger entry type.

View File

@@ -187,7 +187,7 @@ enum class ECDSACanonicality
Therefore, to prevent malleability attacks we
define a fully canonical signature as one where:
R < G - S
where G is the curve order.

View File

@@ -32,7 +32,7 @@ public:
using value_type = Integer;
explicit
STInteger (Integer v)
STInteger (Integer v)
: value_ (v)
{ }

View File

@@ -46,12 +46,12 @@ public:
}
STLedgerEntry (const Serializer & s, uint256 const& index);
STLedgerEntry (SerialIter & sit, uint256 const& index);
STLedgerEntry(SerialIter&& sit, uint256 const& index)
: STLedgerEntry(sit, index) {}
STLedgerEntry (const STObject & object, uint256 const& index);
STBase*
@@ -72,9 +72,9 @@ public:
}
std::string getFullText () const override;
std::string getText () const override;
Json::Value getJson (int options) const override;
/** Returns the 'key' (or 'index') of this item.
@@ -112,15 +112,15 @@ public:
{
return getFieldU16 (sfLedgerEntryType);
}
bool isThreadedType() const; // is this a ledger entry that can be threaded
bool isThreaded () const; // is this ledger entry actually threaded
uint256 getThreadedTransaction () const;
std::uint32_t getThreadedLedger () const;
bool thread (uint256 const& txID, std::uint32_t ledgerSeq, uint256 & prevTxID,
std::uint32_t & prevLedgerID);

View File

@@ -268,7 +268,7 @@ public:
bool
isEquivalent (const STBase& t) const override;
bool
isDefault () const override
{

View File

@@ -66,7 +66,7 @@ public:
{
return STI_VECTOR256;
}
void
add (Serializer& s) const override;
@@ -75,7 +75,7 @@ public:
bool
isEquivalent (const STBase& t) const override;
bool
isDefault () const override
{

View File

@@ -343,7 +343,7 @@ public:
{
return getBitString<160>();
}
uint256
get256()
{

View File

@@ -141,7 +141,7 @@ using sha512_hasher = beast::sha512_hasher;
representing a Ripple account, from a message. Typically the
message is the public key of the account - which is not
stored in the account root.
The same computation is used regardless of the cryptographic
scheme implied by the public key. For example, the public key
may be an ed25519 public key or a secp256k1 public key. Support
@@ -217,7 +217,7 @@ public:
explicit
operator result_type() noexcept
{
auto const digest =
auto const digest =
sha512_hasher::result_type(h_);
result_type result;
std::copy(digest.begin(),

View File

@@ -97,7 +97,7 @@ STArray::STArray (SerialIter& sit, SField const& f)
v_.emplace_back(fn);
v_.back().set (sit, 1);
if (v_.back().setTypeFromSField (fn) == STObject::typeSetFail)
{
throw std::runtime_error ("Malformed object in array");

View File

@@ -157,7 +157,7 @@ encodeBase58(
Wallet Seed
Account Public Key
Account ID
@param temp A pointer to storage of not
less than 2*(size+6) bytes
*/

View File

@@ -63,7 +63,7 @@ public:
out.push_back ((hi*16)+lo);
}
}
blob
sig (std::string const& hex)
{

View File

@@ -68,7 +68,7 @@ parseHexOrBase58 (std::string const& s);
Wallet Seed
Account Public Key
Account ID
@param temp A pointer to storage of not
less than 2*(size+6) bytes
*/

View File

@@ -33,7 +33,7 @@ using clock_type = beast::abstract_clock <std::chrono::steady_clock>;
// An entry in the table
// VFALCO DEPRECATED using boost::intrusive list
struct Entry
struct Entry
: public beast::List <Entry>::Node
{
Entry () = delete;

View File

@@ -35,4 +35,4 @@ ripplePathFind (RippleLineCache::pointer const& cache,
}
#endif
#endif

View File

@@ -184,12 +184,12 @@ public:
// comparison/sync functions
void getMissingNodes (std::vector<SHAMapNodeID>& nodeIDs, std::vector<uint256>& hashes, int max,
SHAMapSyncFilter * filter);
bool getNodeFat (SHAMapNodeID node,
std::vector<SHAMapNodeID>& nodeIDs,
std::vector<Blob>& rawNode,
bool fatLeaves, std::uint32_t depth) const;
bool getRootNode (Serializer & s, SHANodeFormat format) const;
std::vector<uint256> getNeededHashes (int max, SHAMapSyncFilter * filter);
SHAMapAddNode addRootNode (uint256 const& hash, Blob const& rootNode, SHANodeFormat format,

View File

@@ -23,7 +23,7 @@
#include <ripple/basics/base_uint.h>
#include <iosfwd>
#include <stdexcept>
namespace ripple {
enum class SHAMapType

View File

@@ -52,7 +52,7 @@ public:
testcase ("add/traverse");
beast::Journal const j; // debug journal
tests::TestFamily f(j);
// h3 and h4 differ only in the leaf, same terminal node (level 19)

File diff suppressed because it is too large Load Diff

View File

@@ -102,7 +102,7 @@ class flags : private detail::flags_helper
{
private:
Account account_;
public:
template <class... Args>
flags (Account const& account,
@@ -121,7 +121,7 @@ class nflags : private detail::flags_helper
{
private:
Account account_;
public:
template <class... Args>
nflags (Account const& account,

View File

@@ -99,7 +99,7 @@ create (Account const& account,
/** Cancel a ticket */
//Json::Value
//cancel (Account const& account,
} // ticket
/** Match the number of tickets on the account. */

View File

@@ -194,7 +194,7 @@ public:
#endif
if (result.second)
good_.insert(key);
// register a hit for slightly late validations
// register a hit for slightly late validations
if (ledger_ && ledger == ledger_)
if (result.first->second.onHit())
good_.insert(key);

View File

@@ -58,7 +58,7 @@ Most important thing that we do:
namespace ripple {
namespace unl {
Logic::Logic (Store& store, beast::Journal journal)
: /*store_ (store)
, */journal_ (journal)

View File

@@ -71,8 +71,6 @@ private:
std::chrono::steady_clock, hardened_hash<>> ledgers_;
std::pair<LedgerHash, LedgerMeta> latest_; // last fully validated
boost::container::flat_set<BasicHorizon*> connections_;
//boost::container::flat_set<
public:
explicit

View File

@@ -70,7 +70,7 @@ struct WebSocket02
HandlerPtr makeHandler (ServerDescription const&);
/** Make a connection endpoint from a handler. */
static
static
EndpointPtr makeEndpoint (HandlerPtr&&);
/** Get the ASIO strand that this connection lives on. */

View File

@@ -29,7 +29,7 @@ namespace websocket {
struct WebSocket04
{
using EndpointBase = websocketpp::server <Config04>;
using Connection = EndpointBase::connection_type;
using ConnectionPtr = std::shared_ptr<Connection>;
using ConnectionWeakPtr = std::weak_ptr<Connection>;
@@ -92,7 +92,7 @@ struct WebSocket04
HandlerPtr makeHandler (ServerDescription const&);
/** Make a connection endpoint from a handler. */
static
static
EndpointPtr makeEndpoint (HandlerPtr&&);
/** Get the ASIO strand that this connection lives on. */