Add compile time option for new Validators code

This commit is contained in:
Vinnie Falco
2013-09-04 13:51:55 -07:00
parent d71211185e
commit cca092f5d1
2 changed files with 9 additions and 0 deletions

View File

@@ -166,4 +166,11 @@
#define RIPPLE_PEER_USES_BEAST_MULTISOCKET 0
#endif
// Here temporarily to turn off new Validations code while it
// is being written.
//
#ifndef RIPPLE_USE_NEW_VALIDATIONS
#define RIPPLE_USE_NEW_VALIDATIONS 0
#endif
#endif

View File

@@ -1471,12 +1471,14 @@ static void checkValidation (Job&, SerializedValidation::pointer val, bool isTru
//----------------------------------------------------------------------
//
{
#if RIPPLE_USE_NEW_VALIDATIONS
SerializedValidation const& sv (*val);
Validators::ReceivedValidation rv;
rv.ledgerHash = sv.getLedgerHash ();
uint160 const publicKeyHash (sv.getSignerPublic ().getNodeID ());
rv.signerPublicKeyHash = RipplePublicKeyHash (publicKeyHash.begin ());
getApp ().getValidators ().receiveValidation (rv);
#endif
}
//
//----------------------------------------------------------------------