From da7a6a67120887daf18ef78a29ea47aa54c33445 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Tue, 6 Feb 2024 10:19:33 -0600 Subject: [PATCH] use `Proof.init` --- codex/slots/converters.nim | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/codex/slots/converters.nim b/codex/slots/converters.nim index cfea2fb6..f9716fa3 100644 --- a/codex/slots/converters.nim +++ b/codex/slots/converters.nim @@ -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)