Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: track full_transactions propagation when packet size limited #3993

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions crates/net/network/src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,17 @@ where
// send hashes of transactions
self.network.send_transactions_hashes(*peer_id, new_pooled_hashes);
} else {
// send full transactions
self.network.send_transactions(*peer_id, full_transactions.build());

for hash in new_pooled_hashes.into_iter_hashes() {
propagated.0.entry(hash).or_default().push(PropagateKind::Full(*peer_id));
let new_full_transactions = full_transactions.build();

for tx in new_full_transactions.iter() {
propagated
.0
.entry(tx.hash())
.or_default()
.push(PropagateKind::Full(*peer_id));
}
// send full transactions
self.network.send_transactions(*peer_id, new_full_transactions);
}
}
}
Expand Down
Loading