Skip to content

Commit 928e0ce

Browse files
committed
rpc+multi: rename universe_commitments -> enable_supply_commitments
Renames the field for consistency with updated terminology and boolean flag conventions elsewhere in the codebase. Field tag remains the same (15), so wire format is unchanged. The feature is not in use, so this change is safe despite being technically breaking.
1 parent 0e736bb commit 928e0ce

File tree

6 files changed

+202
-206
lines changed

6 files changed

+202
-206
lines changed

cmd/commands/assets.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ var (
9999
groupByGroupName = "by_group"
100100
assetIDName = "asset_id"
101101
shortResponseName = "short"
102-
universeCommitmentsName = "universe_commitments"
102+
enableSupplyCommitmentsName = "enable_supply_commitments"
103103
feeRateName = "sat_per_vbyte"
104104
skipProofCourierPingCheckName = "skip-proof-courier-ping-check"
105105
assetAmountName = "amount"
@@ -198,9 +198,9 @@ var mintAssetCommand = cli.Command{
198198
"was derived from",
199199
},
200200
cli.BoolFlag{
201-
Name: universeCommitmentsName,
201+
Name: enableSupplyCommitmentsName,
202202
Usage: "if set, the asset group will be minted with " +
203-
"universe commitments enabled " +
203+
"universe supply commitments enabled " +
204204
"(minter-controlled, on-chain attestations " +
205205
"that anchor and verify the state of an " +
206206
"asset group); this option restricts the " +
@@ -434,8 +434,10 @@ func mintAsset(ctx *cli.Context) error {
434434
AssetVersion: taprpc.AssetVersion(
435435
ctx.Uint64(assetVersionName),
436436
),
437-
ExternalGroupKey: externalKey,
438-
UniverseCommitments: ctx.Bool(universeCommitmentsName),
437+
ExternalGroupKey: externalKey,
438+
EnableSupplyCommitments: ctx.Bool(
439+
enableSupplyCommitmentsName,
440+
),
439441
},
440442
ShortResponse: ctx.Bool(shortResponseName),
441443
})

itest/supply_commit_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func assertAnchorTxPreCommitOut(
8989
// universe/supply commitments enabled.
9090
func testPreCommitOutput(t *harnessTest) {
9191
mintReq := CopyRequest(issuableAssets[0])
92-
mintReq.Asset.UniverseCommitments = true
92+
mintReq.Asset.EnableSupplyCommitments = true
9393
rpcAssets := MintAssetsConfirmBatch(
9494
t.t, t.lndHarness.Miner().Client, t.tapd,
9595
[]*mintrpc.MintAssetRequest{mintReq},
@@ -119,7 +119,7 @@ func testPreCommitOutput(t *harnessTest) {
119119
GroupedAsset: true,
120120
GroupKey: tweakedGroupKey,
121121

122-
UniverseCommitments: true,
122+
EnableSupplyCommitments: true,
123123
},
124124
}
125125
rpcAssets = MintAssetsConfirmBatch(
@@ -156,7 +156,7 @@ func testSupplyCommitIgnoreAsset(t *harnessTest) {
156156
t.Log("Minting asset group with a single normal asset and " +
157157
"universe/supply commitments enabled")
158158
mintReq := issuableAssets[0]
159-
mintReq.Asset.UniverseCommitments = true
159+
mintReq.Asset.EnableSupplyCommitments = true
160160
rpcAssets := MintAssetsConfirmBatch(
161161
t.t, t.lndHarness.Miner().Client, t.tapd,
162162
[]*mintrpc.MintAssetRequest{mintReq},

rpcserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ func (r *rpcServer) MintAsset(ctx context.Context,
621621
Amount: req.Asset.Amount,
622622
EnableEmission: req.Asset.NewGroupedAsset,
623623
Meta: &seedlingMeta,
624-
UniverseCommitments: req.Asset.UniverseCommitments,
624+
UniverseCommitments: req.Asset.EnableSupplyCommitments,
625625
}
626626

627627
rpcsLog.Infof("[MintAsset]: version=%v, type=%v, name=%v, amt=%v, "+

0 commit comments

Comments
 (0)