Skip to content

Commit d88ec8a

Browse files
committed
multi: don't use old word "emission" in err msg
We renamed the RPC-level flag to NewGroupedAsset to make its use more clear. This commit adjusts some of the left-over error messages to align with the rename.
1 parent 96b1e18 commit d88ec8a

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

rpcserver.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -443,19 +443,19 @@ func (r *rpcServer) MintAsset(ctx context.Context,
443443
// Using a specific group key or anchor implies disabling emission.
444444
case req.Asset.NewGroupedAsset:
445445
if specificGroupKey || specificGroupAnchor {
446-
return nil, fmt.Errorf("must disable emission to " +
447-
"specify a group")
446+
return nil, fmt.Errorf("must not create new grouped " +
447+
"asset to specify an existing group")
448448
}
449449

450450
// A group tapscript root cannot be specified if emission is disabled.
451451
case !req.Asset.NewGroupedAsset && groupTapscriptRootSize != 0:
452452
return nil, fmt.Errorf("cannot specify a group tapscript root" +
453-
"with emission disabled")
453+
"when not creating a new grouped asset")
454454

455455
// A group internal key cannot be specified if emission is disabled.
456456
case !req.Asset.NewGroupedAsset && specificGroupInternalKey:
457457
return nil, fmt.Errorf("cannot specify a group internal key" +
458-
"with emission disabled")
458+
"when not creating a new grouped asset")
459459

460460
// If the asset is intended to be part of an existing group, a group key
461461
// or anchor must be specified, but not both. Neither a group tapscript
@@ -473,12 +473,14 @@ func (r *rpcServer) MintAsset(ctx context.Context,
473473

474474
if groupTapscriptRootSize != 0 {
475475
return nil, fmt.Errorf("cannot specify a group " +
476-
"tapscript root with emission disabled")
476+
"tapscript root when not creating a new " +
477+
"grouped asset")
477478
}
478479

479480
if specificGroupInternalKey {
480481
return nil, fmt.Errorf("cannot specify a group " +
481-
"internal key with emission disabled")
482+
"internal key when not creating a new " +
483+
"grouped asset")
482484
}
483485

484486
// A group was specified without GroupedAsset being set.
@@ -608,8 +610,9 @@ func (r *rpcServer) MintAsset(ctx context.Context,
608610
}
609611

610612
rpcsLog.Infof("[MintAsset]: version=%v, type=%v, name=%v, amt=%v, "+
611-
"enable_emission=%v", seedling.AssetVersion, seedling.AssetType,
612-
seedling.AssetName, seedling.Amount, seedling.EnableEmission)
613+
"new_grouped_asset=%v", seedling.AssetVersion,
614+
seedling.AssetType, seedling.AssetName, seedling.Amount,
615+
seedling.EnableEmission)
613616

614617
if scriptKey != nil {
615618
seedling.ScriptKey = *scriptKey

tapgarden/planter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2675,12 +2675,12 @@ func (c *ChainPlanter) prepAssetSeedling(ctx context.Context,
26752675
// against.
26762676
if req.GroupInternalKey != nil && req.ExternalKey.IsNone() {
26772677
return fmt.Errorf("cannot specify group internal key " +
2678-
"without enabling emission")
2678+
"without creating a new grouped asset")
26792679
}
26802680

26812681
if req.GroupTapscriptRoot != nil {
26822682
return fmt.Errorf("cannot specify group tapscript " +
2683-
"root without enabling emission")
2683+
"root without creating a new grouped asset")
26842684
}
26852685
}
26862686

0 commit comments

Comments
 (0)