Skip to content

Commit

Permalink
feat: switch to DynamicDory in substrate module
Browse files Browse the repository at this point in the history
  • Loading branch information
tlovell-sxt committed Oct 26, 2024
1 parent f116fcf commit e21503b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/substrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use proof_of_sql::{
commitment::{QueryCommitments, TableCommitment},
database::TableRef,
},
proof_primitive::dory::DoryCommitment,
proof_primitive::dory::DynamicDoryCommitment,
};
use proof_of_sql_parser::{Identifier, ResourceId};
use subxt::{OnlineClient, PolkadotConfig};
Expand All @@ -39,7 +39,7 @@ fn resource_id_to_table_id(resource_id: &ResourceId) -> TableIdentifier {
pub async fn query_commitments(
resource_ids: &[ResourceId],
url: &str,
) -> Result<QueryCommitments<DoryCommitment>, Box<dyn core::error::Error>> {
) -> Result<QueryCommitments<DynamicDoryCommitment>, Box<dyn core::error::Error>> {
let api = OnlineClient::<SxtConfig>::from_insecure_url(url).await?;

// Create a collection of futures
Expand All @@ -59,7 +59,7 @@ pub async fn query_commitments(
.await?
.ok_or("Commitment not found")?;
let table_commitments = postcard::from_bytes(&table_commitment_bytes.data.0)?;
Ok::<(TableRef, TableCommitment<DoryCommitment>), Box<dyn core::error::Error>>((
Ok::<(TableRef, TableCommitment<DynamicDoryCommitment>), Box<dyn core::error::Error>>((
TableRef::new(id),
table_commitments,
))
Expand All @@ -70,6 +70,6 @@ pub async fn query_commitments(
let results = try_join_all(futures)
.await?
.into_iter()
.collect::<QueryCommitments<DoryCommitment>>();
.collect::<QueryCommitments<DynamicDoryCommitment>>();
Ok(results)
}

0 comments on commit e21503b

Please sign in to comment.