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 #337 #338

Merged
merged 2 commits into from
Mar 23, 2023
Merged

Fix #337 #338

merged 2 commits into from
Mar 23, 2023

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Mar 23, 2023

Fix #337
Amends #335

While less efficient this alternative implementation is for sure correct.

@github-actions
Copy link

github-actions bot commented Mar 23, 2023

twiggy diff report

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


 Delta Bytes │ Item
─────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
        +604 ┊ <alloc::collections::btree::map::BTreeMap<K,V,A> as core::clone::Clone>::clone::clone_subtree::h953e9994aa36d328
        +602 ┊ smoldot::trie::calculate_root::AllKeys::inject::h10a464b5d8ba0f83
        -602 ┊ smoldot::trie::calculate_root::AllKeys::inject::h1c293bfdc8a6798d
        -457 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::hdf71814a25fd23f8
        +457 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::hf6a9c3e3aa62d785
        +324 ┊ hashbrown::raw::RawTable<T,A>::clone_from_impl::h11d3b16c1f565d48
        -323 ┊ smoldot::executor::storage_diff::TrieDiff<T>::merge_map::ha824ec590d17814a
        +284 ┊ alloc::collections::btree::navigate::<impl alloc::collections::btree::node::NodeRef<BorrowType,K,V,alloc::collections::btree::node::marker::LeafOrInternal>>::find_leaf_edges_spanning_range::h4e63ab17377a80c0
        +236 ┊ alloc::collections::btree::navigate::<impl alloc::collections::btree::node::Handle<alloc::collections::btree::node::NodeRef<BorrowType,K,V,alloc::collections::btree::node::marker::LeafOrInternal>,alloc::collections::btree::node::marker::KV>>::next_leaf_edge::h80edcfb3808023c0
        +183 ┊ <hashbrown::raw::RawTable<T,A> as core::clone::Clone>::clone::h89275c5a4c6205cb
        +144 ┊ data[0]
        +128 ┊ alloc::collections::btree::node::Handle<alloc::collections::btree::node::NodeRef<BorrowType,K,V,alloc::collections::btree::node::marker::LeafOrInternal>,Type>::force::h67581f89c0170655
        +126 ┊ hashbrown::raw::RawTable<T,A>::new_uninitialized::h90397915df4d35e0
        -114 ┊ <hashbrown::map::HashMap<K,V,S,A> as core::iter::traits::collect::Extend<(K,V)>>::extend::ha6c743f4f39650ef
        +114 ┊ <hashbrown::map::HashMap<K,V,S,A> as core::iter::traits::collect::Extend<(K,V)>>::extend::hcc0a6abad3ca51b3
        -109 ┊ <hashbrown::set::HashSet<T,S,A> as core::iter::traits::collect::FromIterator<T>>::from_iter::h4533947ca5c21681
        +109 ┊ <hashbrown::set::HashSet<T,S,A> as core::iter::traits::collect::FromIterator<T>>::from_iter::h5c30c244f4c8eeb8
         +95 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::h983da7035cf260a9
         -95 ┊ <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::ha2208f36d41fb174
         -95 ┊ <hashbrown::set::HashSet<T,S,A> as core::iter::traits::collect::Extend<T>>::extend::h211b2049d988d4e9
        +418 ┊ ... and 17 more.
       +3384 ┊ Σ [37 Total Rows]

@tomaka tomaka added this pull request to the merge queue Mar 23, 2023
@tomaka tomaka merged commit 34edcdc into smol-dot:main Mar 23, 2023
@tomaka tomaka deleted the amend-tx-impl branch March 23, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad logic in https://github.com/smol-dot/smoldot/pull/335
1 participant