mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Use ledger hash to break ties (RIPD-1468):
When two ledgers have the same number of validations, the code will now use the ledger hash itself to break the tie rather than the highest node ID supporting each validation.
This commit is contained in:
@@ -100,26 +100,11 @@ public:
|
||||
// Signs the validation and returns the signing hash
|
||||
uint256 sign (SecretKey const& secretKey);
|
||||
|
||||
// The validation this replaced
|
||||
uint256 const& getPreviousHash ()
|
||||
{
|
||||
return mPreviousHash;
|
||||
}
|
||||
bool isPreviousHash (uint256 const& h) const
|
||||
{
|
||||
return mPreviousHash == h;
|
||||
}
|
||||
void setPreviousHash (uint256 const& h)
|
||||
{
|
||||
mPreviousHash = h;
|
||||
}
|
||||
|
||||
private:
|
||||
static SOTemplate const& getFormat ();
|
||||
|
||||
void setNode ();
|
||||
|
||||
uint256 mPreviousHash;
|
||||
NodeID mNodeID;
|
||||
bool mTrusted = false;
|
||||
NetClock::time_point mSeen = {};
|
||||
|
||||
Reference in New Issue
Block a user