mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +00:00
Sync Linux tweaks.
This commit is contained in:
@@ -49,7 +49,8 @@ bool ValidationCollection::hasValidation(uint32 ledgerIndex,uint160& hanko,uint3
|
||||
string hankoStr;
|
||||
Database* db=theApp->getDB();
|
||||
db->escape(hanko.begin(),hanko.GetSerializeSize(),hankoStr);
|
||||
string sql=strprintf("SELECT ValidationID,seqnum from Validations where LedgerIndex=%d and hanko=%s",ledgerIndex,hankoStr);
|
||||
string sql=strprintf("SELECT ValidationID,seqnum from Validations where LedgerIndex=%d and hanko=%s",
|
||||
ledgerIndex,hankoStr.c_str());
|
||||
if(db->executeSQL(sql.c_str()))
|
||||
{
|
||||
if(db->startIterRows())
|
||||
@@ -195,6 +196,14 @@ void ValidationCollection::getValidations(uint32 ledgerIndex,vector<newcoin::Val
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
In member function
|
||||
‘bool ValidationCollection::getConsensusLedger(uint32, uint256&, Ledger::pointer&, uint256&)’:
|
||||
invalid initialization of non-const reference of type ‘std::vector<newcoin::Validation>&’ from
|
||||
an rvalue of type ‘std::vector<newcoin::Validation>’
|
||||
invalid initialization of non-const reference of type ‘ValidationCollection::Group&’ from
|
||||
an rvalue of type ‘ValidationCollection::Group’
|
||||
|
||||
// look through all the validated hashes at that index
|
||||
// put the ledgers into compatible groups
|
||||
// Pick the group with the most votes
|
||||
@@ -205,9 +214,9 @@ bool ValidationCollection::getConsensusLedger(uint32 ledgerIndex, uint256& ourHa
|
||||
{
|
||||
|
||||
unsigned int maxVotes=theConfig.MIN_VOTES_FOR_CONSENSUS;
|
||||
vector<newcoin::Validation>& mostValid=vector<newcoin::Validation>();
|
||||
vector<newcoin::Validation>& mostValid=vector<newcoin::Validation>(); // DJS ERROR HERE
|
||||
vector< Group >& groups=mIndexGroups[ledgerIndex];
|
||||
Group& maxGroup=Group();
|
||||
Group& maxGroup=Group(); // DJS ERROR HERE
|
||||
BOOST_FOREACH(Group& group,groups)
|
||||
{
|
||||
if(group.mValidations.size()>maxVotes)
|
||||
@@ -230,4 +239,5 @@ bool ValidationCollection::getConsensusLedger(uint32 ledgerIndex, uint256& ourHa
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user