Skip to content

Commit

Permalink
style(drive): update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov committed Jul 9, 2024
1 parent 85faf50 commit eca0a1e
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ impl Drive {
.basic
.grove_get_proved_path_query
{
0 => self.grove_get_proved_path_query_v0(
path_query,
transaction,
drive_operations,
),
0 => self.grove_get_proved_path_query_v0(path_query, transaction, drive_operations),
version => Err(Error::Drive(DriveError::UnknownVersionMismatch {
method: "grove_get_proved_path_query".to_string(),
known_versions: vec![0],
Expand Down
21 changes: 3 additions & 18 deletions packages/rs-drive/src/drive/identity/balance/prove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ impl Drive {
drive_version: &DriveVersion,
) -> Result<Vec<u8>, Error> {
let balance_query = Self::balance_for_identity_id_query(identity_id);
self.grove_get_proved_path_query(
&balance_query,
transaction,
&mut vec![],
drive_version,
)
self.grove_get_proved_path_query(&balance_query, transaction, &mut vec![], drive_version)
}

/// Proves an Identity's balance and revision from the backing store
Expand All @@ -30,12 +25,7 @@ impl Drive {
drive_version: &DriveVersion,
) -> Result<Vec<u8>, Error> {
let balance_query = Self::balance_and_revision_for_identity_id_query(identity_id);
self.grove_get_proved_path_query(
&balance_query,
transaction,
&mut vec![],
drive_version,
)
self.grove_get_proved_path_query(&balance_query, transaction, &mut vec![], drive_version)
}

/// Proves multiple Identity balances from the backing store
Expand All @@ -46,12 +36,7 @@ impl Drive {
drive_version: &DriveVersion,
) -> Result<Vec<u8>, Error> {
let balance_query = Self::balances_for_identity_ids_query(identity_ids)?;
self.grove_get_proved_path_query(
&balance_query,
transaction,
&mut vec![],
drive_version,
)
self.grove_get_proved_path_query(&balance_query, transaction, &mut vec![], drive_version)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ impl Drive {
) -> Result<Vec<u8>, Error> {
let mut drive_operations: Vec<LowLevelDriveOperation> = vec![];
let query = Self::full_identities_query(identity_ids)?;
self.grove_get_proved_path_query(
&query,
transaction,
&mut drive_operations,
drive_version,
)
self.grove_get_proved_path_query(&query, transaction, &mut drive_operations, drive_version)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ impl Drive {
) -> Result<Vec<u8>, Error> {
let mut drive_operations: Vec<LowLevelDriveOperation> = vec![];
let query = Self::full_identity_query(&identity_id)?;
self.grove_get_proved_path_query(
&query,
transaction,
&mut drive_operations,
drive_version,
)
self.grove_get_proved_path_query(&query, transaction, &mut drive_operations, drive_version)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ impl Drive {
&purposes,
Some((identity_ids.len() * purposes.len()) as u16),
);
self.grove_get_proved_path_query(
&query,
transaction,
&mut drive_operations,
drive_version,
)
self.grove_get_proved_path_query(&query, transaction, &mut drive_operations, drive_version)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ impl Drive {
drive_version: &DriveVersion,
) -> Result<Vec<u8>, Error> {
let path_query = Self::identity_id_by_unique_public_key_hash_query(public_key_hash);
self.grove_get_proved_path_query(
&path_query,
transaction,
&mut vec![],
drive_version,
)
self.grove_get_proved_path_query(&path_query, transaction, &mut vec![], drive_version)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ impl Drive {
drive_version: &DriveVersion,
) -> Result<Vec<u8>, Error> {
let identity_query = Self::fetch_identities_all_keys_query(self, identity_ids, limit)?;
self.grove_get_proved_path_query(
&identity_query,
transaction,
&mut vec![],
drive_version,
)
self.grove_get_proved_path_query(&identity_query, transaction, &mut vec![], drive_version)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ impl Drive {
SizedQuery::new(Query::new_single_query_item(query_item), Some(count), None),
);

self.grove_get_proved_path_query(
&path_query,
transaction,
&mut vec![],
drive_version,
)
self.grove_get_proved_path_query(&path_query, transaction, &mut vec![], drive_version)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ impl Drive {
versions_counter_path_vec(),
Query::new_single_query_item(QueryItem::RangeFull(RangeFull)),
);
self.grove_get_proved_path_query(
&path_query,
transaction,
&mut vec![],
drive_version,
)
self.grove_get_proved_path_query(&path_query, transaction, &mut vec![], drive_version)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl Drive {
Some(path_query)
}));
}

let path_query = PathQuery::merge(path_queries.iter().collect()).map_err(Error::GroveDB)?;

self.grove_get_proved_path_query(
Expand Down

0 comments on commit eca0a1e

Please sign in to comment.