ProcessState new slight refactor
This commit is contained in:
parent
b848b3bf78
commit
f3da088698
@ -42,8 +42,9 @@ pub struct ProcessState {
|
||||
}
|
||||
|
||||
impl ProcessState {
|
||||
pub fn new(commited_in: OutPoint, clear_state: Pcd, public_data: Pcd, roles: Roles) -> anyhow::Result<Self> {
|
||||
let pcd_commitment = PcdCommitments::new(&commited_in, &clear_state, &public_data, &roles)?;
|
||||
pub fn new(commited_in: OutPoint, private_data: Pcd, public_data: Pcd, roles: Roles) -> anyhow::Result<Self> {
|
||||
let all_attributes = Pcd::new(private_data.clone().into_iter().chain(public_data.clone()).collect());
|
||||
let pcd_commitment = PcdCommitments::new(&commited_in, &all_attributes, &roles)?;
|
||||
|
||||
let merkle_root = pcd_commitment.create_merkle_tree()?.root().ok_or(anyhow::Error::msg("Invalid merkle tree"))?;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user