Don't remove all feeds subscribed to a chain when one disconnects (#383)

* Only remove the feed that disconnected to not break the rest...

* use multimap struct to avoid sync issues between feed and chain

* add a remove test, too

* cargo fmt

* fix name of test

* move multimap to common so we can doctest it and add 'unique' to name

* cargo fmt

* Return old key if value moved to make uniqueness more obvious
This commit is contained in:
James Wilson
2021-08-27 08:05:44 +01:00
committed by GitHub
parent 19db1a48ef
commit 7a3e30cb01
4 changed files with 180 additions and 28 deletions
+2
View File
@@ -30,6 +30,7 @@ mod dense_map;
mod either_sink;
mod mean_list;
mod most_seen;
mod multi_map_unique;
mod num_stats;
// Export a bunch of common bits at the top level for ease of import:
@@ -38,4 +39,5 @@ pub use dense_map::DenseMap;
pub use either_sink::EitherSink;
pub use mean_list::MeanList;
pub use most_seen::MostSeen;
pub use multi_map_unique::MultiMapUnique;
pub use num_stats::NumStats;