@@ -156,7 +156,7 @@ func TestUniverseEmptyTree(t *testing.T) {
156156}
157157
158158func randLeafKey (t * testing.T ) universe.LeafKey {
159- return universe.LeafKey {
159+ return universe.BaseLeafKey {
160160 OutPoint : test .RandOp (t ),
161161 ScriptKey : fn .Ptr (asset .NewScriptKey (test .RandPubKey (t ))),
162162 }
@@ -649,12 +649,13 @@ func TestUniverseLeafQuery(t *testing.T) {
649649
650650 // We'll create three new leaves, all of them will share the exact same
651651 // minting outpoint, but will have distinct script keys.
652- rootMintingPoint := randLeafKey (t ).OutPoint
652+ rootMintingPoint := randLeafKey (t ).LeafOutPoint ()
653653
654654 leafToScriptKey := make (map [asset.SerializedKey ]universe.Leaf )
655655 for i := 0 ; i < numLeafs ; i ++ {
656- targetKey := randLeafKey (t )
657- targetKey .OutPoint = rootMintingPoint
656+ baseKey := randLeafKey (t ).(universe.BaseLeafKey )
657+ baseKey .OutPoint = rootMintingPoint
658+ targetKey := baseKey
658659
659660 leaf := randMintingLeaf (t , assetGen , id .GroupKey )
660661 if id .GroupKey != nil {
@@ -673,7 +674,9 @@ func TestUniverseLeafQuery(t *testing.T) {
673674 }
674675 }
675676
676- scriptKey := asset .ToSerialized (targetKey .ScriptKey .PubKey )
677+ scriptKey := asset .ToSerialized (
678+ targetKey .LeafScriptKey ().PubKey ,
679+ )
677680
678681 leafToScriptKey [scriptKey ] = leaf
679682
@@ -685,9 +688,11 @@ func TestUniverseLeafQuery(t *testing.T) {
685688
686689 // If we query for only the minting point, then all three leaves should
687690 // be returned.
688- proofs , err := baseUniverse .FetchIssuanceProof (ctx , universe.LeafKey {
689- OutPoint : rootMintingPoint ,
690- })
691+ proofs , err := baseUniverse .FetchIssuanceProof (
692+ ctx , universe.BaseLeafKey {
693+ OutPoint : rootMintingPoint ,
694+ },
695+ )
691696 require .NoError (t , err )
692697 require .Len (t , proofs , numLeafs )
693698
@@ -698,12 +703,14 @@ func TestUniverseLeafQuery(t *testing.T) {
698703 scriptKey , err := btcec .ParsePubKey (scriptKeyBytes [:])
699704 require .NoError (t , err )
700705
701- p , err := baseUniverse .FetchIssuanceProof (ctx , universe.LeafKey {
702- OutPoint : rootMintingPoint ,
703- ScriptKey : & asset.ScriptKey {
704- PubKey : scriptKey ,
706+ p , err := baseUniverse .FetchIssuanceProof (
707+ ctx , universe.BaseLeafKey {
708+ OutPoint : rootMintingPoint ,
709+ ScriptKey : & asset.ScriptKey {
710+ PubKey : scriptKey ,
711+ },
705712 },
706- } )
713+ )
707714 require .NoError (t , err )
708715 require .Len (t , p , 1 )
709716
0 commit comments