Skip to content

Commit 9c3fe6e

Browse files
author
blu3beri
committed
Remove seq_no
Work funded by the Government of Ontario. Signed-off-by: blu3beri <[email protected]>
1 parent 1dd9a60 commit 9c3fe6e

File tree

5 files changed

+5
-19
lines changed

5 files changed

+5
-19
lines changed

anoncreds/src/data_types/anoncreds/rev_reg_def.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ impl IssuanceType {
3939
*self == IssuanceType::ISSUANCE_BY_DEFAULT
4040
}
4141
}
42-
4342
#[allow(non_camel_case_types)]
4443
#[derive(Copy, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
4544
pub enum RegistryType {

anoncreds/src/data_types/anoncreds/schema.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ pub struct SchemaV1 {
2222
pub version: String,
2323
#[serde(rename = "attrNames")]
2424
pub attr_names: AttributeNames,
25-
pub seq_no: Option<u32>,
2625
}
2726

2827
#[derive(Debug, Clone, Serialize, Deserialize, Default)]

anoncreds/src/ffi/schema.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ pub extern "C" fn anoncreds_create_schema(
1010
schema_name: FfiStr,
1111
schema_version: FfiStr,
1212
attr_names: FfiStrList,
13-
seq_no: i64,
1413
result_p: *mut ObjectHandle,
1514
) -> ErrorCode {
1615
catch_error(|| {
@@ -25,11 +24,6 @@ pub extern "C" fn anoncreds_create_schema(
2524
schema_name,
2625
schema_version,
2726
attr_names.to_string_vec()?.into(),
28-
if seq_no > 0 {
29-
Some(seq_no as u32)
30-
} else {
31-
None
32-
},
3327
)?;
3428
let handle = ObjectHandle::create(schema)?;
3529
unsafe { *result_p = handle };

anoncreds/src/services/issuer.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ pub fn create_schema(
3030
schema_name: &str,
3131
schema_version: &str,
3232
attr_names: AttributeNames,
33-
seq_no: Option<u32>,
3433
) -> Result<Schema> {
3534
trace!(
3635
"create_schema >>> schema_name: {:?}, schema_version: {:?}, attr_names: {:?}",
@@ -43,7 +42,6 @@ pub fn create_schema(
4342
name: schema_name.to_string(),
4443
version: schema_version.to_string(),
4544
attr_names,
46-
seq_no,
4745
};
4846
Ok(Schema::SchemaV1(schema))
4947
}

anoncreds/tests/anoncreds_demos.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ use self::utils::anoncreds::{IssuerWallet, ProverWallet};
1313

1414
mod utils;
1515

16-
pub static GVT_SCHEMA_NAME: &'static str = "gvt";
17-
pub static GVT_SCHEMA_ATTRIBUTES: &[&'static str; 4] = &["name", "age", "sex", "height"];
1816
pub static SCHEMA_ID: &str = "mock:uri";
1917
pub static CRED_DEF_ID: &str = "mock:uri";
18+
pub const GVT_SCHEMA_NAME: &str = "gvt";
19+
pub const GVT_SCHEMA_ATTRIBUTES: &[&str; 4] = &["name", "age", "sex", "height"];
2020

2121
#[test]
2222
fn anoncreds_works_for_single_issuer_single_prover() {
@@ -27,13 +27,9 @@ fn anoncreds_works_for_single_issuer_single_prover() {
2727
let mut prover_wallet = ProverWallet::default();
2828

2929
// Issuer creates Schema - would be published to the ledger
30-
let gvt_schema = issuer::create_schema(
31-
GVT_SCHEMA_NAME,
32-
"1.0",
33-
GVT_SCHEMA_ATTRIBUTES[..].into(),
34-
None,
35-
)
36-
.expect("Error creating gvt schema for issuer");
30+
let gvt_schema =
31+
issuer::create_schema(GVT_SCHEMA_NAME, "1.0", GVT_SCHEMA_ATTRIBUTES[..].into())
32+
.expect("Error creating gvt schema for issuer");
3733

3834
// Issuer creates Credential Definition
3935
let cred_def_parts = issuer::create_credential_definition(

0 commit comments

Comments
 (0)