Disable tx refetch logic (#6384)

This commit is contained in:
Emilia Hane
2024-02-05 12:43:45 +01:00
committed by GitHub
parent 7213533541
commit c29af0ce56

View File

@@ -227,6 +227,9 @@ pub struct TransactionsManager<Pool> {
transaction_events: UnboundedMeteredReceiver<NetworkTransactionEvent>,
/// TransactionsManager metrics
metrics: TransactionsManagerMetrics,
/// Configures wether or not to handle hashes from an announcement that didn't fit in the
/// request. If set to `false`, hashes that don't fit will be dropped.
enable_tx_refetch: bool,
}
impl<Pool: TransactionPool> TransactionsManager<Pool> {
@@ -261,6 +264,7 @@ impl<Pool: TransactionPool> TransactionsManager<Pool> {
NETWORK_POOL_TRANSACTIONS_SCOPE,
),
metrics: Default::default(),
enable_tx_refetch: false,
}
}
}
@@ -1133,8 +1137,10 @@ where
some_ready = true;
}
// try drain buffered transactions
this.request_buffered_hashes();
if this.enable_tx_refetch {
// try drain buffered transactions
this.request_buffered_hashes();
}
this.update_request_metrics();
// Advance all imports