mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
Add Validators unit tests
This commit is contained in:
@@ -120,6 +120,6 @@
|
||||
//#define BEAST_BIND_USES_TR1 1
|
||||
//#define BEAST_BIND_USES_BOOST 1
|
||||
|
||||
#define BEAST_UNIT_TESTS 1
|
||||
//#define BEAST_UNIT_TESTS 1
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,6 +41,9 @@ public:
|
||||
|
||||
// Visit every object in the database
|
||||
// This function will only be called during an import operation
|
||||
//
|
||||
// VFALCO TODO Replace FUNCTION_TYPE with a beast lift.
|
||||
//
|
||||
virtual void visitAll (FUNCTION_TYPE <void (NodeObject::pointer)>) = 0;
|
||||
|
||||
// VFALCO TODO Put this bulk writing logic into a separate class.
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
class Validator
|
||||
{
|
||||
public:
|
||||
typedef RippleAddress PublicKey;
|
||||
typedef uint256 PublicKey;
|
||||
|
||||
explicit Validator (PublicKey const& publicKey);
|
||||
|
||||
|
||||
@@ -218,3 +218,23 @@ Validators* Validators::New (Listener* listener)
|
||||
{
|
||||
return new ValidatorsImp (listener);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Produces validators for unit tests.
|
||||
*/
|
||||
class TestValidatorSource : public Validators::Source
|
||||
{
|
||||
public:
|
||||
static Validator makeValidator (int publicKeyIndex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ValidatorList::Ptr fetch ()
|
||||
{
|
||||
ValidatorList::Ptr list = new ValidatorList;
|
||||
|
||||
return list;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user