Added ledger method to remove existing token

This commit is contained in:
Jedrzej Stuczynski
2020-03-02 15:44:29 +00:00
parent 30611d0a68
commit 0f5167b57f
@@ -33,6 +33,13 @@ impl ClientLedger {
self.inner.lock().await.0.insert(client_address, auth_token)
}
pub(crate) async fn remove_token(
&mut self,
client_address: &DestinationAddressBytes,
) -> Option<AuthToken> {
self.inner.lock().await.0.remove(client_address)
}
pub(crate) async fn current_clients(&self) -> Vec<MixProviderClient> {
self.inner
.lock()