use `Proof.init`
This commit is contained in:
parent
96811ca86f
commit
da7a6a6712
|
@ -78,11 +78,11 @@ func toVerifiableProof*(
|
|||
proof: CodexProof): ?!Poseidon2Proof =
|
||||
|
||||
let
|
||||
verifiableProof = Poseidon2Proof(
|
||||
index: proof.index,
|
||||
nleaves: proof.nleaves,
|
||||
path: proof.path.mapIt(
|
||||
nodes = proof.path.mapIt(
|
||||
? Poseidon2Hash.fromBytes(it.toArray32).toFailure
|
||||
))
|
||||
)
|
||||
|
||||
success verifiableProof
|
||||
Poseidon2Proof.init(
|
||||
index = proof.index,
|
||||
nleaves = proof.nleaves,
|
||||
nodes = nodes)
|
||||
|
|
Loading…
Reference in New Issue