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

Only send transactions to peers with open substream #2717

Merged
merged 3 commits into from
Sep 7, 2022

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Sep 6, 2022

Fix #2680

The code in network_service was wrong and was attempting to send a transaction to every peer we have a connection with, instead of every peer we have opened a transactions notifications substream with.

Copy link
Contributor

@mergify mergify bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatically approving tomaka's pull requests. This auto-approval will be removed once more maintainers are active.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2022

twiggy diff report

Difference in .wasm size before and after this pull request.


 Delta Bytes │ Item
─────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
        +223 ┊ <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter::he836e1c777861a19
        +151 ┊ alloc::vec::Vec<T,A>::extend_desugared::h05985a9fee4fc06f
        +128 ┊ <core::iter::adapters::cloned::Cloned<I> as core::iter::traits::iterator::Iterator>::next::ha8122863ac82687b
        +109 ┊ smoldot::libp2p::peers::Peers<TConn,TNow>::opened_out_notifications::h53f0bb2f61c9bad0
         -95 ┊ core::iter::traits::iterator::Iterator::collect::hef4d1423c37a57e5
         +56 ┊ <alloc::vec::Vec<T,A> as alloc::vec::spec_extend::SpecExtend<T,I>>::spec_extend::h366f72fb1c4a94b2
         +56 ┊ <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::h952e1fbd8c711e61
         +30 ┊ core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once::h0ad6b1ef2a811088
         -27 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hba94edd9867ebb6a
         +22 ┊ smoldot::network::service::ChainNetwork<TNow>::opened_transactions_substream::h401cf4ef955f35cc
         +16 ┊ data[0]
         +10 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h61f7287cd92add74
       +1605 ┊ Σ [12 Total Rows]

@tomaka tomaka added the automerge Automatically merge pull request as soon as possible label Sep 7, 2022
@mergify mergify bot merged commit 9ce1d5f into paritytech:main Sep 7, 2022
@tomaka tomaka deleted the fix-2680 branch September 7, 2022 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge pull request as soon as possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic during token transfer
2 participants