Skip to content

Commit 39c1f27

Browse files
authored
Merge pull request #1075 from sputn1ck/ownershipproof_outpoint
Expand VerifyOwnershipProof
2 parents 8eb0ac9 + d724a0e commit 39c1f27

File tree

4 files changed

+244
-142
lines changed

4 files changed

+244
-142
lines changed

rpcserver.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5921,7 +5921,7 @@ func (r *rpcServer) VerifyAssetOwnership(ctx context.Context,
59215921

59225922
headerVerifier := tapgarden.GenHeaderVerifier(ctx, r.cfg.ChainBridge)
59235923
groupVerifier := tapgarden.GenGroupVerifier(ctx, r.cfg.MintingStore)
5924-
_, err = p.Verify(
5924+
snapShot, err := p.Verify(
59255925
ctx, nil, headerVerifier, proof.DefaultMerkleVerifier,
59265926
groupVerifier, lookup,
59275927
)
@@ -5931,6 +5931,14 @@ func (r *rpcServer) VerifyAssetOwnership(ctx context.Context,
59315931

59325932
return &wrpc.VerifyAssetOwnershipResponse{
59335933
ValidProof: true,
5934+
Outpoint: &taprpc.OutPoint{
5935+
Txid: snapShot.OutPoint.Hash[:],
5936+
OutputIndex: snapShot.OutPoint.Index,
5937+
},
5938+
OutpointStr: snapShot.OutPoint.String(),
5939+
BlockHash: snapShot.AnchorBlockHash[:],
5940+
BlockHashStr: snapShot.AnchorBlockHash.String(),
5941+
BlockHeight: snapShot.AnchorBlockHeight,
59345942
}, nil
59355943
}
59365944

0 commit comments

Comments
 (0)