Add public_data to CommitMsg
This commit is contained in:
parent
131ee8c55b
commit
dc77482cc6
@ -1,4 +1,4 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use rand::{thread_rng, RngCore};
|
use rand::{thread_rng, RngCore};
|
||||||
@ -75,7 +75,8 @@ impl AnkFlag {
|
|||||||
pub struct CommitMessage {
|
pub struct CommitMessage {
|
||||||
pub process_id: OutPoint,
|
pub process_id: OutPoint,
|
||||||
pub pcd_commitment: Value, // map of field <=> hash of the clear value
|
pub pcd_commitment: Value, // map of field <=> hash of the clear value
|
||||||
pub roles: HashMap<String, RoleDefinition>, // Can be hashed and compared with the value above
|
pub roles: BTreeMap<String, RoleDefinition>,
|
||||||
|
pub public_data: BTreeMap<String, String>,
|
||||||
pub validation_tokens: Vec<Proof>,
|
pub validation_tokens: Vec<Proof>,
|
||||||
pub error: Option<AnkError>,
|
pub error: Option<AnkError>,
|
||||||
}
|
}
|
||||||
@ -86,12 +87,14 @@ impl CommitMessage {
|
|||||||
pub fn new_update_commitment(
|
pub fn new_update_commitment(
|
||||||
process_id: OutPoint,
|
process_id: OutPoint,
|
||||||
pcd_commitment: Value,
|
pcd_commitment: Value,
|
||||||
roles: HashMap<String, RoleDefinition>,
|
roles: BTreeMap<String, RoleDefinition>,
|
||||||
|
public_data: BTreeMap<String, String>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
process_id,
|
process_id,
|
||||||
pcd_commitment,
|
pcd_commitment,
|
||||||
roles,
|
roles,
|
||||||
|
public_data,
|
||||||
validation_tokens: vec![],
|
validation_tokens: vec![],
|
||||||
error: None,
|
error: None,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user