@@ -129,7 +129,12 @@ func randLeafKey(t *testing.T) universe.LeafKey {
129129 }
130130}
131131
132- func randProof (t * testing.T ) * proof.Proof {
132+ func randProof (t * testing.T , argAsset * asset.Asset ) * proof.Proof {
133+ proofAsset := * asset .RandAsset (t , asset .Normal )
134+ if argAsset != nil {
135+ proofAsset = * argAsset
136+ }
137+
133138 return & proof.Proof {
134139 PrevOut : wire.OutPoint {},
135140 BlockHeader : wire.BlockHeader {
@@ -142,7 +147,7 @@ func randProof(t *testing.T) *proof.Proof {
142147 }},
143148 },
144149 TxMerkleProof : proof.TxMerkleProof {},
145- Asset : * asset . RandAsset ( t , asset . Normal ) ,
150+ Asset : proofAsset ,
146151 InclusionProof : proof.TaprootProof {
147152 InternalKey : test .RandPubKey (t ),
148153 },
@@ -152,7 +157,7 @@ func randProof(t *testing.T) *proof.Proof {
152157func randMintingLeaf (t * testing.T , assetGen asset.Genesis ,
153158 groupKey * btcec.PublicKey ) universe.Leaf {
154159
155- randProof := randProof (t )
160+ randProof := randProof (t , nil )
156161
157162 leaf := universe.Leaf {
158163 GenesisWithGroup : universe.GenesisWithGroup {
@@ -320,7 +325,7 @@ func TestUniverseIssuanceProofs(t *testing.T) {
320325 testLeaf := & testLeaves [idx ]
321326
322327 var proofBuf bytes.Buffer
323- randProof := randProof (t )
328+ randProof := randProof (t , nil )
324329 require .NoError (t , randProof .Encode (& proofBuf ))
325330
326331 testLeaf .Leaf .RawProof = proofBuf .Bytes ()
0 commit comments