mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 11:12:50 +01:00
[refactor] wrap {Have,Get}TxToReconsider in txdownload
This commit is contained in:
@@ -3076,7 +3076,7 @@ bool PeerManagerImpl::ProcessOrphanTx(Peer& peer)
|
||||
|
||||
CTransactionRef porphanTx = nullptr;
|
||||
|
||||
while (CTransactionRef porphanTx = m_txdownloadman.GetOrphanageRef().GetTxToReconsider(peer.m_id)) {
|
||||
while (CTransactionRef porphanTx = m_txdownloadman.GetTxToReconsider(peer.m_id)) {
|
||||
const MempoolAcceptResult result = m_chainman.ProcessTransaction(porphanTx);
|
||||
const TxValidationState& state = result.m_state;
|
||||
const Txid& orphanHash = porphanTx->GetHash();
|
||||
@@ -5000,7 +5000,7 @@ bool PeerManagerImpl::ProcessMessages(CNode* pfrom, std::atomic<bool>& interrupt
|
||||
// the extra work may not be noticed, possibly resulting in an
|
||||
// unnecessary 100ms delay)
|
||||
LOCK(m_tx_download_mutex);
|
||||
if (m_txdownloadman.GetOrphanageRef().HaveTxToReconsider(peer->m_id)) fMoreWork = true;
|
||||
if (m_txdownloadman.HaveMoreWork(peer->m_id)) fMoreWork = true;
|
||||
} catch (const std::exception& e) {
|
||||
LogDebug(BCLog::NET, "%s(%s, %u bytes): Exception '%s' (%s) caught\n", __func__, SanitizeString(msg.m_type), msg.m_message_size, e.what(), typeid(e).name());
|
||||
} catch (...) {
|
||||
|
||||
Reference in New Issue
Block a user