fix: track full_transactions propagation when packet size limited (#3993)

This commit is contained in:
bemevolent
2023-07-31 14:11:31 -05:00
committed by GitHub
parent 9a7911b49e
commit 27c65d291f

View File

@@ -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());
let new_full_transactions = full_transactions.build();
for hash in new_pooled_hashes.into_iter_hashes() {
propagated.0.entry(hash).or_default().push(PropagateKind::Full(*peer_id));
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);
}
}
}