From 4d1b45906db6d5f629c902159c4335114a22ca1e Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 15 May 2013 15:55:35 -0700 Subject: [PATCH] Update the signature check flags if needed. --- src/cpp/ripple/Transactor.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cpp/ripple/Transactor.cpp b/src/cpp/ripple/Transactor.cpp index 82b8ab9bc..daa6171b3 100644 --- a/src/cpp/ripple/Transactor.cpp +++ b/src/cpp/ripple/Transactor.cpp @@ -160,7 +160,6 @@ TER Transactor::checkSeq() // check stuff before you bother to lock the ledger TER Transactor::preCheck() { - mTxnAccountID = mTxn.getSourceAccount().getAccountID(); if (!mTxnAccountID) { @@ -177,11 +176,15 @@ TER Transactor::preCheck() mSigningPubKey = RippleAddress::createAccountPublic(mTxn.getSigningPubKey()); // Consistency: really signed. - if ( !isSetBit(mParams, tapNO_CHECK_SIGN) && !mTxn.checkSign(mSigningPubKey)) + if (!mTxn.isKnownGood()) { - cLog(lsWARNING) << "applyTransaction: Invalid transaction: bad signature"; - - return temINVALID; + if (mTxn.isKnownBad() || (!isSetBit(mParams, tapNO_CHECK_SIGN) && !mTxn.checkSign(mSigningPubKey))) + { + mTxn.setGood(); + cLog(lsWARNING) << "applyTransaction: Invalid transaction: bad signature"; + return temINVALID; + } + mTxn.isKnownGood(); } return tesSUCCESS;