Bugfixes.

This commit is contained in:
JoelKatz
2012-06-01 16:39:26 -07:00
parent 9607ea1543
commit aaedf5116b
2 changed files with 5 additions and 4 deletions

View File

@@ -434,7 +434,6 @@ void LedgerConsensus::closeLedger()
{
Log(lsINFO) << "Closing ledger";
Ledger::pointer initial = theApp->getMasterLedger().getCurrentLedger();
statusChange(newcoin::neCLOSING_LEDGER, initial);
statusChange(newcoin::neCLOSING_LEDGER, mPreviousLedger);
}
@@ -692,6 +691,7 @@ void LedgerConsensus::accept(SHAMap::pointer set)
val.set_validation(&validation[0], validation.size());
theApp->getConnectionPool().relayMessage(NULL, boost::make_shared<PackedMessage>(val, newcoin::mtVALIDATION));
Log(lsINFO) << "Validation sent " << newLCL->getHash().GetHex();
statusChange(newcoin::neACCEPTED_LEDGER, newOL);
}
void LedgerConsensus::endConsensus()

View File

@@ -20,7 +20,7 @@ void LedgerMaster::pushLedger(Ledger::pointer newLedger)
// Caller should already have properly assembled this ledger into "ready-to-close" form --
// all candidate transactions must already be appled
ScopedLock sl(mLock);
if(!!mFinalizedLedger)
if (!!mFinalizedLedger)
{
mFinalizedLedger->setClosed();
mFinalizedLedger->setAccepted();
@@ -37,7 +37,8 @@ void LedgerMaster::pushLedger(Ledger::pointer newLCL, Ledger::pointer newOL)
assert(!newOL->isClosed() && !newOL->isAccepted());
ScopedLock sl(mLock);
mLedgerHistory.addAcceptedLedger(newLCL);
if (!!mFinalizedLedger)
mLedgerHistory.addAcceptedLedger(mFinalizedLedger);
mFinalizedLedger = newLCL;
mCurrentLedger = newOL;
mEngine.setLedger(newOL);
@@ -90,7 +91,7 @@ void LedgerMaster::applyFutureProposals(uint32 ledgerIndex)
{
for(list< pair<Peer::pointer,newcoin::ProposeLedger> >::iterator iter=mFutureProposals.begin(); iter !=mFutureProposals.end(); )
{
if( (*iter).second.ledgerindex() == ledgerIndex)
if ((*iter).second.ledgerindex() == ledgerIndex)
{
checkLedgerProposal((*iter).first,(*iter).second);
mFutureProposals.erase(iter);