From 632ce3d8bd40abfe975acd12a2874ab7a52539fe Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 14 Apr 2013 03:16:42 -0700 Subject: [PATCH] Use isSet rather than isValid to avoid needless crypto operations. --- src/cpp/ripple/LedgerConsensus.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/ripple/LedgerConsensus.cpp b/src/cpp/ripple/LedgerConsensus.cpp index 9a2ee1e09..8aa50f473 100644 --- a/src/cpp/ripple/LedgerConsensus.cpp +++ b/src/cpp/ripple/LedgerConsensus.cpp @@ -153,7 +153,7 @@ LedgerConsensus::LedgerConsensus(const uint256& prevLCLHash, Ledger::ref previou mCloseResolution = ContinuousLedgerTiming::getNextLedgerTimeResolution( mPreviousLedger->getCloseResolution(), mPreviousLedger->getCloseAgree(), previousLedger->getLedgerSeq() + 1); - if (mValPublic.isValid() && mValPrivate.isValid() && !theApp->getOPs().isNeedNetworkLedger()) + if (mValPublic.isSet() && mValPrivate.isSet() && !theApp->getOPs().isNeedNetworkLedger()) { cLog(lsINFO) << "Entering consensus process, validating"; mValidating = true; @@ -183,7 +183,7 @@ LedgerConsensus::LedgerConsensus(const uint256& prevLCLHash, Ledger::ref previou void LedgerConsensus::checkOurValidation() { // This only covers some cases - Fix for the case where we can't ever acquire the consensus ledger - if (!mHaveCorrectLCL || !mValPublic.isValid() || !mValPrivate.isValid() || theApp->getOPs().isNeedNetworkLedger()) + if (!mHaveCorrectLCL || !mValPublic.isSet() || !mValPrivate.isSet() || theApp->getOPs().isNeedNetworkLedger()) return; SerializedValidation::pointer lastVal = theApp->getOPs().getLastValidation();