mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 05:55:51 +00:00
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:
@@ -28,7 +28,6 @@ namespace ripple {
|
||||
|
||||
STValidation::STValidation (SerialIter& sit, bool checkSignature)
|
||||
: STObject (getFormat (), sit, sfValidation)
|
||||
, mTrusted (false)
|
||||
{
|
||||
mNodeID = RippleAddress::createNodePublic (getFieldVL (sfSigningPubKey)).getNodeID ();
|
||||
assert (mNodeID.isNonZero ());
|
||||
@@ -44,7 +43,7 @@ STValidation::STValidation (
|
||||
uint256 const& ledgerHash, std::uint32_t signTime,
|
||||
RippleAddress const& raPub, bool isFull)
|
||||
: STObject (getFormat (), sfValidation)
|
||||
, mTrusted (false)
|
||||
, mSeen (signTime)
|
||||
{
|
||||
// Does not sign
|
||||
setFieldH256 (sfLedgerHash, ledgerHash);
|
||||
@@ -85,6 +84,11 @@ std::uint32_t STValidation::getSignTime () const
|
||||
return getFieldU32 (sfSigningTime);
|
||||
}
|
||||
|
||||
std::uint32_t STValidation::getSeenTime () const
|
||||
{
|
||||
return mSeen;
|
||||
}
|
||||
|
||||
std::uint32_t STValidation::getFlags () const
|
||||
{
|
||||
return getFieldU32 (sfFlags);
|
||||
|
||||
Reference in New Issue
Block a user