From 83b0edbd43507f9119cc6fd7ba1d53a11fbd2b25 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Mon, 21 Oct 2024 17:37:37 -0300 Subject: [PATCH] add nil check Signed-off-by: Ignacio Hagopian --- proof_ipa.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proof_ipa.go b/proof_ipa.go index f553c848..15d4e8a8 100644 --- a/proof_ipa.go +++ b/proof_ipa.go @@ -53,6 +53,9 @@ type VerkleProof struct { } func (vp *VerkleProof) Copy() *VerkleProof { + if vp == nil { + return nil + } ret := &VerkleProof{ OtherStems: make([][StemSize]byte, len(vp.OtherStems)), DepthExtensionPresent: make([]byte, len(vp.DepthExtensionPresent)),