Skip to content

Commit bbe373b

Browse files
committed
rpcserver: add asset burn logging
This commit adds a few simple logging statements relating to the asset burn endpoint.
1 parent 6236ce5 commit bbe373b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

rpcserver.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,6 +2063,8 @@ func (r *rpcServer) SendAsset(_ context.Context,
20632063
func (r *rpcServer) BurnAsset(ctx context.Context,
20642064
in *taprpc.BurnAssetRequest) (*taprpc.BurnAssetResponse, error) {
20652065

2066+
rpcsLog.Debug("Executing asset burn")
2067+
20662068
var assetID asset.ID
20672069
switch {
20682070
case len(in.GetAssetId()) > 0:
@@ -2106,6 +2108,15 @@ func (r *rpcServer) BurnAsset(ctx context.Context,
21062108
return nil, fmt.Errorf("error querying asset group: %w", err)
21072109
}
21082110

2111+
var serializedGroupKey []byte
2112+
if groupKey != nil {
2113+
serializedGroupKey = groupKey.SerializeCompressed()
2114+
}
2115+
2116+
rpcsLog.Infof("Burning asset (asset_id=%x, group_key=%x, "+
2117+
"burn_amount=%d)", assetID[:], serializedGroupKey,
2118+
in.AmountToBurn)
2119+
21092120
fundResp, err := r.cfg.AssetWallet.FundBurn(
21102121
ctx, &tapscript.FundingDescriptor{
21112122
ID: assetID,

0 commit comments

Comments
 (0)