mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Put back the code I commented out. Fix the non-const reference
bound to a temporary.
This commit is contained in:
@@ -196,14 +196,6 @@ 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
|
||||
@@ -214,9 +206,9 @@ bool ValidationCollection::getConsensusLedger(uint32 ledgerIndex, uint256& ourHa
|
||||
{
|
||||
|
||||
unsigned int maxVotes=theConfig.MIN_VOTES_FOR_CONSENSUS;
|
||||
vector<newcoin::Validation>& mostValid=vector<newcoin::Validation>(); // DJS ERROR HERE
|
||||
vector< Group >& groups=mIndexGroups[ledgerIndex];
|
||||
Group& maxGroup=Group(); // DJS ERROR HERE
|
||||
Group empty;
|
||||
Group& maxGroup=empty;
|
||||
BOOST_FOREACH(Group& group, groups)
|
||||
{
|
||||
if(group.mValidations.size()>maxVotes)
|
||||
@@ -240,4 +232,3 @@ bool ValidationCollection::getConsensusLedger(uint32 ledgerIndex, uint256& ourHa
|
||||
|
||||
return(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user