Keep network status & ring in a tokio::sync::watch

advantages
- reads don't prevent preparing writes
- can be followed from other parts of the system by cloning the receiver
This commit is contained in:
Alex Auvolat
2020-04-11 23:53:32 +02:00
parent 5dd59e437d
commit 9c931f5eda
9 changed files with 165 additions and 133 deletions
+1 -1
View File
@@ -10,8 +10,8 @@ use tokio::sync::RwLock;
use crate::api_server;
use crate::background::*;
use crate::data::*;
use crate::block::*;
use crate::data::*;
use crate::error::Error;
use crate::membership::System;
use crate::proto::*;