From cca092f5d1fdfe63e60117250e757a253cf8dd59 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 4 Sep 2013 13:51:55 -0700 Subject: [PATCH] Add compile time option for new Validators code --- BeastConfig.h | 7 +++++++ modules/ripple_app/peers/ripple_Peer.cpp | 2 ++ 2 files changed, 9 insertions(+) diff --git a/BeastConfig.h b/BeastConfig.h index 574a370492..f031c3b1e0 100644 --- a/BeastConfig.h +++ b/BeastConfig.h @@ -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 diff --git a/modules/ripple_app/peers/ripple_Peer.cpp b/modules/ripple_app/peers/ripple_Peer.cpp index ee42555e89..0c777516fb 100644 --- a/modules/ripple_app/peers/ripple_Peer.cpp +++ b/modules/ripple_app/peers/ripple_Peer.cpp @@ -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 } // //----------------------------------------------------------------------