Allow a peer position to be removed from the consensus logic if the peer is

not responding. This version uses static timing. A peer takes a position
every 12 seconds and a position is valid for 20 seconds. It might make sense
to either make that timing adaptive or include a "validity time" field in
the position. However, I think this is really only going to be an issue in
fairly small networks (which is why we are seeing it).
This commit is contained in:
JoelKatz
2012-08-31 15:51:41 -07:00
parent f636ae861e
commit ad12e318ba
5 changed files with 41 additions and 21 deletions

View File

@@ -56,8 +56,9 @@ bool LedgerProposal::checkSign(const std::string& signature, const uint256& sign
void LedgerProposal::changePosition(const uint256& newPosition, uint32 closeTime)
{
mCurrentHash = newPosition;
mCloseTime = closeTime;
mCurrentHash = newPosition;
mCloseTime = closeTime;
mTime = boost::posix_time::second_clock::universal_time();
++mProposeSeq;
}