refactor create dht value

This commit is contained in:
Christien Rioux
2023-07-08 22:50:44 -04:00
parent 9f9feeb325
commit 19f384ab33
13 changed files with 53 additions and 40 deletions
@@ -195,9 +195,10 @@ impl RoutingContext {
/// Returns the newly allocated DHT record's key if successful. The records is considered 'open' after the create operation succeeds.
pub async fn create_dht_record(
&self,
kind: CryptoKind,
schema: DHTSchema,
kind: Option<CryptoKind>,
) -> VeilidAPIResult<DHTRecordDescriptor> {
let kind = kind.unwrap_or(best_crypto_kind());
let storage_manager = self.api.storage_manager()?;
storage_manager
.create_record(kind, schema, self.unlocked_inner.safety_selection)