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)),