Add public_data to CommitMsg
This commit is contained in:
parent
58cc5081b2
commit
e073b45094
@ -1,4 +1,4 @@
|
||||
use std::collections::HashMap;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use anyhow::Result;
|
||||
use rand::{thread_rng, RngCore};
|
||||
@ -75,7 +75,8 @@ impl AnkFlag {
|
||||
pub struct CommitMessage {
|
||||
pub process_id: OutPoint,
|
||||
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 error: Option<AnkError>,
|
||||
}
|
||||
@ -86,12 +87,14 @@ impl CommitMessage {
|
||||
pub fn new_update_commitment(
|
||||
process_id: OutPoint,
|
||||
pcd_commitment: Value,
|
||||
roles: HashMap<String, RoleDefinition>,
|
||||
roles: BTreeMap<String, RoleDefinition>,
|
||||
public_data: BTreeMap<String, String>,
|
||||
) -> Self {
|
||||
Self {
|
||||
process_id,
|
||||
pcd_commitment,
|
||||
roles,
|
||||
public_data,
|
||||
validation_tokens: vec![],
|
||||
error: None,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user