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
+1 -1
View File
@@ -127,7 +127,7 @@ async fn run_soak_test(opts: SoakTestOpts) {
tokio::spawn(async move {
let telemetry = test_utils::fake_telemetry::FakeTelemetry::new(
Duration::from_secs(3),
format!("Node {}", idx + 1),
format!("Node {}", (ids_per_node * idx) + id + 1),
"Polkadot".to_owned(),
id + 1,
);