Consensus ledger switch improvements

* Expire validations faster based on when we first saw them.
* Never jump to a ledger prior to the latest fully-valid ledger
* Drop validations with signing times too far in the future immediately
This commit is contained in:
JoelKatz
2015-11-18 14:15:04 -08:00
committed by Nik Bougalis
parent 469d5494ea
commit 45b07ff9ec
12 changed files with 77 additions and 51 deletions

View File

@@ -66,6 +66,7 @@ public:
uint256 getLedgerHash () const;
std::uint32_t getSignTime () const;
std::uint32_t getSeenTime () const;
std::uint32_t getFlags () const;
RippleAddress getSignerPublic () const;
NodeID getNodeID () const
@@ -81,10 +82,14 @@ public:
uint256 getSigningHash () const;
bool isValid (uint256 const& ) const;
void setTrusted ()
void setTrusted ()
{
mTrusted = true;
}
void setSeen (std::uint32_t s)
{
mSeen = s;
}
Blob getSigned () const;
Blob getSignature () const;
@@ -112,7 +117,8 @@ private:
uint256 mPreviousHash;
NodeID mNodeID;
bool mTrusted;
bool mTrusted = false;
std::uint32_t mSeen = 0;
};
} // ripple