Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 3,115 Lines • ▼ Show 20 Lines | while (!orphan_work_set.empty()) { | ||||
assert(recentRejects); | assert(recentRejects); | ||||
recentRejects->insert(orphanTxId); | recentRejects->insert(orphanTxId); | ||||
m_orphanage.EraseTx(orphanTxId); | m_orphanage.EraseTx(orphanTxId); | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
m_mempool.check(m_chainman.ActiveChainstate()); | CChainState &active_chainstate = m_chainman.ActiveChainstate(); | ||||
m_mempool.check(active_chainstate.CoinsTip(), | |||||
active_chainstate.m_chain.Height() + 1); | |||||
} | } | ||||
bool PeerManagerImpl::PrepareBlockFilterRequest( | bool PeerManagerImpl::PrepareBlockFilterRequest( | ||||
CNode &peer, const CChainParams &chain_params, BlockFilterType filter_type, | CNode &peer, const CChainParams &chain_params, BlockFilterType filter_type, | ||||
uint32_t start_height, const BlockHash &stop_hash, uint32_t max_height_diff, | uint32_t start_height, const BlockHash &stop_hash, uint32_t max_height_diff, | ||||
const CBlockIndex *&stop_index, BlockFilterIndex *&filter_index) { | const CBlockIndex *&stop_index, BlockFilterIndex *&filter_index) { | ||||
const bool supported_filter_type = | const bool supported_filter_type = | ||||
(filter_type == BlockFilterType::BASIC && | (filter_type == BlockFilterType::BASIC && | ||||
▲ Show 20 Lines • Show All 1,203 Lines • ▼ Show 20 Lines | if (msg_type == NetMsgType::TX) { | ||||
return; | return; | ||||
} | } | ||||
const MempoolAcceptResult result = | const MempoolAcceptResult result = | ||||
AcceptToMemoryPool(m_chainman.ActiveChainstate(), config, m_mempool, | AcceptToMemoryPool(m_chainman.ActiveChainstate(), config, m_mempool, | ||||
ptx, false /* bypass_limits */); | ptx, false /* bypass_limits */); | ||||
const TxValidationState &state = result.m_state; | const TxValidationState &state = result.m_state; | ||||
if (result.m_result_type == MempoolAcceptResult::ResultType::VALID) { | if (result.m_result_type == MempoolAcceptResult::ResultType::VALID) { | ||||
m_mempool.check(m_chainman.ActiveChainstate()); | CChainState &active_chainstate = m_chainman.ActiveChainstate(); | ||||
m_mempool.check(active_chainstate.CoinsTip(), | |||||
active_chainstate.m_chain.Height() + 1); | |||||
// As this version of the transaction was acceptable, we can forget | // As this version of the transaction was acceptable, we can forget | ||||
// about any requests for it. | // about any requests for it. | ||||
m_txrequest.ForgetInvId(tx.GetId()); | m_txrequest.ForgetInvId(tx.GetId()); | ||||
RelayTransaction(tx.GetId(), m_connman); | RelayTransaction(tx.GetId(), m_connman); | ||||
m_orphanage.AddChildrenToWorkSet(tx, peer->m_orphan_work_set); | m_orphanage.AddChildrenToWorkSet(tx, peer->m_orphan_work_set); | ||||
pfrom.m_last_tx_time = GetTime<std::chrono::seconds>(); | pfrom.m_last_tx_time = GetTime<std::chrono::seconds>(); | ||||
▲ Show 20 Lines • Show All 2,803 Lines • Show Last 20 Lines |