All Prd constructors takes sender as a Member
This commit is contained in:
parent
57ce288ca4
commit
a628da9e2a
@ -87,7 +87,7 @@ impl Prd {
|
|||||||
|
|
||||||
pub fn new_update(
|
pub fn new_update(
|
||||||
root_commitment: OutPoint,
|
root_commitment: OutPoint,
|
||||||
sender: String, // Should take Member as argument
|
sender: Member,
|
||||||
roles: HashMap<String, RoleDefinition>,
|
roles: HashMap<String, RoleDefinition>,
|
||||||
keys: Map<String, Value>,
|
keys: Map<String, Value>,
|
||||||
pcd_commitments: Value,
|
pcd_commitments: Value,
|
||||||
@ -95,7 +95,7 @@ impl Prd {
|
|||||||
Self {
|
Self {
|
||||||
prd_type: PrdType::Update,
|
prd_type: PrdType::Update,
|
||||||
root_commitment: root_commitment.to_string(),
|
root_commitment: root_commitment.to_string(),
|
||||||
sender,
|
sender: serde_json::to_string(&sender).unwrap(),
|
||||||
validation_tokens: vec![],
|
validation_tokens: vec![],
|
||||||
keys,
|
keys,
|
||||||
pcd_commitments,
|
pcd_commitments,
|
||||||
@ -106,14 +106,14 @@ impl Prd {
|
|||||||
|
|
||||||
pub fn new_response(
|
pub fn new_response(
|
||||||
root_commitment: OutPoint,
|
root_commitment: OutPoint,
|
||||||
sender: String,
|
sender: Member,
|
||||||
validation_tokens: Vec<Proof>,
|
validation_tokens: Vec<Proof>,
|
||||||
pcd_commitments: Value,
|
pcd_commitments: Value,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
prd_type: PrdType::Response,
|
prd_type: PrdType::Response,
|
||||||
root_commitment: root_commitment.to_string(),
|
root_commitment: root_commitment.to_string(),
|
||||||
sender,
|
sender: serde_json::to_string(&sender).unwrap(),
|
||||||
validation_tokens: validation_tokens,
|
validation_tokens: validation_tokens,
|
||||||
keys: Map::new(),
|
keys: Map::new(),
|
||||||
pcd_commitments,
|
pcd_commitments,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user