Fix a bug triggered by a acquiring a transaction set after having bowed out

of the consensus process.
This commit is contained in:
JoelKatz
2012-09-13 19:32:44 -07:00
parent 1faa8ccda6
commit b35f87564a
3 changed files with 14 additions and 8 deletions

View File

@@ -54,17 +54,20 @@ bool LedgerProposal::checkSign(const std::string& signature, const uint256& sign
return mPublicKey.verifyNodePublic(signingHash, signature);
}
void LedgerProposal::changePosition(const uint256& newPosition, uint32 closeTime)
bool LedgerProposal::changePosition(const uint256& newPosition, uint32 closeTime)
{
if (mProposeSeq == seqLeave)
return false;
mCurrentHash = newPosition;
mCloseTime = closeTime;
mTime = boost::posix_time::second_clock::universal_time();
++mProposeSeq;
return true;
}
void LedgerProposal::bowOut()
{
mCurrentHash = uint256();
mTime = boost::posix_time::second_clock::universal_time();
mProposeSeq = seqLeave;
}