mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Keep one validation back to avoid a split case when some nodes have sent new validations and some haven't
This commit is contained in:
@@ -12,13 +12,21 @@
|
||||
|
||||
typedef boost::unordered_map<uint160, SerializedValidation::pointer> ValidationSet;
|
||||
|
||||
class ValidationPair
|
||||
{
|
||||
public:
|
||||
SerializedValidation::pointer oldest, newest;
|
||||
|
||||
ValidationPair(SerializedValidation::pointer v) : newest(v) { ; }
|
||||
};
|
||||
|
||||
class ValidationCollection
|
||||
{
|
||||
protected:
|
||||
|
||||
boost::mutex mValidationLock;
|
||||
boost::unordered_map<uint256, ValidationSet> mValidations;
|
||||
boost::unordered_map<uint160, SerializedValidation::pointer> mCurrentValidations;
|
||||
boost::unordered_map<uint160, ValidationPair> mCurrentValidations;
|
||||
std::vector<SerializedValidation::pointer> mStaleValidations;
|
||||
bool mWriting;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user