compute MainPod.id from pub_statements; and introduce the trait ToFields (#35)

* compute MainPod.id from pub_statements; and introduce the trait `ToFields`

Compute MainPod.id from pub_statements hash; for it, introduce the trait
`ToFields` at the middleware and implement it for the Statement related
types.

* cleaner statements tofield iter

Co-authored-by: Ahmad Afuni <root@ahmadafuni.com>

---------

Co-authored-by: Ahmad Afuni <root@ahmadafuni.com>
This commit is contained in:
arnaucube 2025-02-06 11:35:57 +01:00 committed by GitHub
parent 8945d7f8a1
commit ca1be65b85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 99 additions and 19 deletions

View file

@ -343,7 +343,6 @@ impl MainPodBuilder {
};
let (statements, operations, public_statements) = compiler.compile(inputs)?;
// TODO: Add API to specify public/private statement
let inputs = MainPodInputs {
signed_pods: &self.input_signed_pods.iter().map(|p| &p.pod).collect_vec(),
main_pods: &self.input_main_pods.iter().map(|p| &p.pod).collect_vec(),