use `Proof.init`

This commit is contained in:
Dmitriy Ryajov 2024-02-06 10:19:33 -06:00
parent 96811ca86f
commit da7a6a6712
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
1 changed files with 7 additions and 7 deletions

View File

@ -78,11 +78,11 @@ func toVerifiableProof*(
proof: CodexProof): ?!Poseidon2Proof =
let
verifiableProof = Poseidon2Proof(
index: proof.index,
nleaves: proof.nleaves,
path: proof.path.mapIt(
? Poseidon2Hash.fromBytes(it.toArray32).toFailure
))
nodes = proof.path.mapIt(
? Poseidon2Hash.fromBytes(it.toArray32).toFailure
)
success verifiableProof
Poseidon2Proof.init(
index = proof.index,
nleaves = proof.nleaves,
nodes = nodes)