mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add const restrictions.
This commit is contained in:
@@ -79,7 +79,7 @@ public:
|
||||
DatabaseCon* getLedgerDB() { return mLedgerDB; }
|
||||
DatabaseCon* getWalletDB() { return mWalletDB; }
|
||||
DatabaseCon* getHashNodeDB() { return mHashNodeDB; }
|
||||
DatabaseCon* getNetNodeDB() { return mNetNodeDB; }
|
||||
DatabaseCon* getNetNodeDB() { return mNetNodeDB; }
|
||||
|
||||
uint256 getNonce256() { return mNonce256; }
|
||||
std::size_t getNonceST() { return mNonceST; }
|
||||
|
||||
@@ -68,6 +68,8 @@ const char *WalletDBInit[] = {
|
||||
FetchUpdated DATETIME \
|
||||
);",
|
||||
|
||||
// Scoring and other information for domains.
|
||||
//
|
||||
// Domain:
|
||||
// Domain source for https.
|
||||
// PublicKey:
|
||||
@@ -104,7 +106,7 @@ const char *WalletDBInit[] = {
|
||||
"CREATE INDEX SeedDomainNext ON SeedDomains (Next);",
|
||||
|
||||
// Table of PublicKeys user has asked to trust.
|
||||
// Fetches are made to the CAS.
|
||||
// Fetches are made to the CAS. This gets the newcoin.txt so even validators without a web server can publish a newcoin.txt.
|
||||
// Next:
|
||||
// Time of next fetch attempt.
|
||||
// Scan:
|
||||
@@ -127,7 +129,8 @@ const char *WalletDBInit[] = {
|
||||
// Allow us to easily find the next SeedNode to fetch.
|
||||
"CREATE INDEX SeedNodeNext ON SeedNodes (Next);",
|
||||
|
||||
// Table of trusted nodes.
|
||||
// Nodes we trust not grossly consipire. Derived from SeedDomains, SeedNodes, and ValidatorReferrals.
|
||||
//
|
||||
// Score:
|
||||
// Computed trust score. Higher is better.
|
||||
// Seen:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#define SECTION_DEFAULT_NAME ""
|
||||
|
||||
section ParseSection(const std::string strInput, const bool bTrim)
|
||||
section ParseSection(const std::string& strInput, const bool bTrim)
|
||||
{
|
||||
std::string strData(strInput);
|
||||
std::vector<std::string> vLines;
|
||||
@@ -66,7 +66,7 @@ void PrintSection(section secInput)
|
||||
std::cerr << "PrintSection<" << std::endl;
|
||||
}
|
||||
|
||||
section::mapped_type* sectionEntries(section& secSource, const std::string strSection)
|
||||
section::mapped_type* sectionEntries(section& secSource, const std::string& strSection)
|
||||
{
|
||||
section::iterator it;
|
||||
section::mapped_type* smtResult;
|
||||
@@ -86,14 +86,14 @@ section::mapped_type* sectionEntries(section& secSource, const std::string strSe
|
||||
return smtResult;
|
||||
}
|
||||
|
||||
int sectionCount(section& secSource, std::string strSection)
|
||||
int sectionCount(section& secSource, const std::string& strSection)
|
||||
{
|
||||
section::mapped_type* pmtEntries = sectionEntries(secSource, strSection);
|
||||
|
||||
return pmtEntries ? -1 : pmtEntries->size();
|
||||
}
|
||||
|
||||
bool sectionSingleB(section& secSource, const std::string strSection, std::string& strValue)
|
||||
bool sectionSingleB(section& secSource, const std::string& strSection, std::string& strValue)
|
||||
{
|
||||
section::mapped_type* pmtEntries = sectionEntries(secSource, strSection);
|
||||
bool bSingle = pmtEntries && 1 == pmtEntries->size();
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
typedef std::map<const std::string, std::vector<std::string> > section;
|
||||
|
||||
section ParseSection(const std::string strInput, const bool bTrim);
|
||||
section ParseSection(const std::string& strInput, const bool bTrim);
|
||||
void PrintSection(section secInput);
|
||||
bool sectionSingleB(section& secSource, const std::string strSection, std::string& strValue);
|
||||
int sectionCount(section& secSource, std::string strSection);
|
||||
section::mapped_type* sectionEntries(section& secSource, const std::string strSection);
|
||||
bool sectionSingleB(section& secSource, const std::string& strSection, std::string& strValue);
|
||||
int sectionCount(section& secSource, const std::string& strSection);
|
||||
section::mapped_type* sectionEntries(section& secSource, const std::string& strSection);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user