From ee397a2e277133ce352b3bbae8ccfca3eb4434a5 Mon Sep 17 00:00:00 2001 From: ledhed2222 Date: Fri, 5 May 2023 01:55:09 -0400 Subject: [PATCH] speed up even more --- src/main/main.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/main/main.cpp b/src/main/main.cpp index 93398812..dc6b1fcc 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -185,23 +185,17 @@ doMigration( } auto txs = doTryFetchTransactions(timer, backend, txHashes, yield); - txs.erase( - std::remove_if( - txs.begin(), - txs.end(), - [&ledgerRange](Backend::TransactionAndMetadata const& tx) { - if (tx.ledgerSequence > ledgerRange->maxSequence) - return true; - ripple::STTx const sttx{ripple::SerialIter{ - tx.transaction.data(), tx.transaction.size()}}; - return sttx.getTxnType() != ripple::TxType::ttNFTOKEN_MINT; - }), - txs.end()); for (auto const& tx : txs) { + if (tx.ledgerSequence > ledgerRange->maxSequence) + continue; + ripple::STTx const sttx{ripple::SerialIter{ tx.transaction.data(), tx.transaction.size()}}; + if (sttx.getTxnType() != ripple::TxType::ttNFTOKEN_MINT) + continue; + ripple::TxMeta const txMeta{ sttx.getTransactionID(), tx.ledgerSequence, tx.metadata}; toWrite.push_back(