mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Don't switch to a dead ledger. Without this, we can even get out of sync with ourselves!
This commit is contained in:
@@ -25,9 +25,11 @@ class ValidationCollection
|
||||
protected:
|
||||
|
||||
boost::mutex mValidationLock;
|
||||
boost::unordered_map<uint256, ValidationSet> mValidations;
|
||||
boost::unordered_map<uint160, ValidationPair> mCurrentValidations;
|
||||
std::vector<SerializedValidation::pointer> mStaleValidations;
|
||||
boost::unordered_map<uint256, ValidationSet> mValidations;
|
||||
boost::unordered_map<uint160, ValidationPair> mCurrentValidations;
|
||||
std::vector<SerializedValidation::pointer> mStaleValidations;
|
||||
std::list<uint256> mDeadLedgers;
|
||||
|
||||
bool mWriting;
|
||||
|
||||
void doWrite();
|
||||
@@ -39,9 +41,15 @@ public:
|
||||
bool addValidation(SerializedValidation::pointer);
|
||||
ValidationSet getValidations(const uint256& ledger);
|
||||
void getValidationCount(const uint256& ledger, bool currentOnly, int& trusted, int& untrusted);
|
||||
|
||||
int getTrustedValidationCount(const uint256& ledger);
|
||||
int getCurrentValidationCount(uint32 afterTime);
|
||||
|
||||
boost::unordered_map<uint256, int> getCurrentValidations();
|
||||
|
||||
void addDeadLedger(const uint256&);
|
||||
std::list<uint256> getDeadLedgers() { return mDeadLedgers; }
|
||||
|
||||
void flush();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user