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 7,278 Lines • ▼ Show 20 Lines | if (msg_type == NetMsgType::AVARESPONSE) { | ||||
| [&txid](TxConflicting &conflicting) { | [&txid](TxConflicting &conflicting) { | ||||
| conflicting.EraseTx(txid); | conflicting.EraseTx(txid); | ||||
| }); | }); | ||||
| m_recent_rejects.insert(txid); | m_recent_rejects.insert(txid); | ||||
| AddToCompactExtraTransactions(tx); | AddToCompactExtraTransactions(tx); | ||||
| if (m_mempool.m_signals) { | if (m_mempool.m_opts.signals) { | ||||
| m_mempool.m_signals->TransactionInvalidated( | m_mempool.m_opts.signals | ||||
| tx, spentCoins); | ->TransactionInvalidated(tx, spentCoins); | ||||
| } | } | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| case avalanche::VoteStatus::Finalized: | case avalanche::VoteStatus::Finalized: | ||||
| // fallthrough | // fallthrough | ||||
| case avalanche::VoteStatus::Accepted: { | case avalanche::VoteStatus::Accepted: { | ||||
| ▲ Show 20 Lines • Show All 1,298 Lines • ▼ Show 20 Lines | if (m_chainman.IsInitialBlockDownload()) { | ||||
| // Send the current filter if we sent MAX_FILTER previously | // Send the current filter if we sent MAX_FILTER previously | ||||
| // and made it out of IBD. | // and made it out of IBD. | ||||
| peer.m_next_send_feefilter = 0us; | peer.m_next_send_feefilter = 0us; | ||||
| } | } | ||||
| } | } | ||||
| if (current_time > peer.m_next_send_feefilter) { | if (current_time > peer.m_next_send_feefilter) { | ||||
| Amount filterToSend = m_fee_filter_rounder.round(currentFilter); | Amount filterToSend = m_fee_filter_rounder.round(currentFilter); | ||||
| // We always have a fee filter of at least the min relay fee | // We always have a fee filter of at least the min relay fee | ||||
| filterToSend = | filterToSend = std::max( | ||||
| std::max(filterToSend, m_mempool.m_min_relay_feerate.GetFeePerK()); | filterToSend, m_mempool.m_opts.min_relay_feerate.GetFeePerK()); | ||||
| if (filterToSend != peer.m_fee_filter_sent) { | if (filterToSend != peer.m_fee_filter_sent) { | ||||
| MakeAndPushMessage(pto, NetMsgType::FEEFILTER, filterToSend); | MakeAndPushMessage(pto, NetMsgType::FEEFILTER, filterToSend); | ||||
| peer.m_fee_filter_sent = filterToSend; | peer.m_fee_filter_sent = filterToSend; | ||||
| } | } | ||||
| peer.m_next_send_feefilter = | peer.m_next_send_feefilter = | ||||
| current_time + | current_time + | ||||
| m_rng.rand_exp_duration(AVG_FEEFILTER_BROADCAST_INTERVAL); | m_rng.rand_exp_duration(AVG_FEEFILTER_BROADCAST_INTERVAL); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 871 Lines • Show Last 20 Lines | |||||