Bypass signature check if it has already been done.

This commit is contained in:
JoelKatz
2013-05-15 15:55:23 -07:00
parent e94802bc2a
commit 28a88b57ac
2 changed files with 8 additions and 1 deletions

View File

@@ -1043,6 +1043,8 @@ int LedgerConsensus::applyTransaction(TransactionEngine& engine, SerializedTrans
TransactionEngineParams parms = openLedger ? tapOPEN_LEDGER : tapNONE;
if (retryAssured)
parms = static_cast<TransactionEngineParams>(parms | tapRETRY);
if (theApp->isNewFlag(txn->getTransactionID(), SF_SIGGOOD))
parms = static_cast<TransactionEngineParams>(parms | tapNO_CHECK_SIGN);
cLog(lsDEBUG) << "TXN " << txn->getTransactionID()
<< (openLedger ? " open" : " closed")

View File

@@ -101,8 +101,13 @@ Ledger::pointer LedgerMaster::closeLedger(bool recover)
{
try
{
TransactionEngineParams tepFlags = tapOPEN_LEDGER;
if (theApp->isNew(it->first.getTXID(), SF_SIGGOOD));
tepFlags = static_cast<TransactionEngineParams>(tepFlags | tapNO_CHECK_SIGN);
bool didApply;
mEngine.applyTransaction(*it->second, tapOPEN_LEDGER, didApply);
mEngine.applyTransaction(*it->second, tepFlags, didApply);
if (didApply)
++recovers;
}