Skip to content

Commit e3cf11e

Browse files
author
Robyn Ffrancon
authored
Merge pull request #640 from lightninglabs/rename-asset-leaf-issuance-proof
multi: rename RPC AssetLeaf proof field to account for transfer proofs
2 parents 6379c0d + 088fb32 commit e3cf11e

File tree

7 files changed

+395
-396
lines changed

7 files changed

+395
-396
lines changed

cmd/tapcli/universe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,8 @@ func universeProofInsert(ctx *cli.Context) error {
526526
LeafKey: assetKey,
527527
},
528528
AssetLeaf: &unirpc.AssetLeaf{
529-
Asset: rpcAsset,
530-
IssuanceProof: rawProof,
529+
Asset: rpcAsset,
530+
Proof: rawProof,
531531
},
532532
}
533533
resp, err := client.InsertProof(ctxc, req)

itest/assertions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,8 +1186,8 @@ func AssertUniverseLeavesEqual(t *testing.T, uniIDs []*unirpc.ID,
11861186
)
11871187

11881188
require.Equal(
1189-
t, aLeaves.Leaves[i].IssuanceProof,
1190-
bLeaves.Leaves[i].IssuanceProof,
1189+
t, aLeaves.Leaves[i].Proof,
1190+
bLeaves.Leaves[i].Proof,
11911191
)
11921192
}
11931193
}

proof/courier.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,8 +1085,8 @@ func (c *UniverseRpcCourier) DeliverProof(ctx context.Context,
10851085
}
10861086

10871087
assetLeaf := unirpc.AssetLeaf{
1088-
Asset: rpcAsset,
1089-
IssuanceProof: proofBuf.Bytes(),
1088+
Asset: rpcAsset,
1089+
Proof: proofBuf.Bytes(),
10901090
}
10911091

10921092
// Construct universe key.
@@ -1202,7 +1202,7 @@ func (c *UniverseRpcCourier) ReceiveProof(ctx context.Context,
12021202
err)
12031203
}
12041204

1205-
proofBlob = resp.AssetLeaf.IssuanceProof
1205+
proofBlob = resp.AssetLeaf.Proof
12061206

12071207
return nil
12081208
}

rpcserver.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3314,8 +3314,8 @@ func marshalAssetLeaf(ctx context.Context, keys taprpc.KeyLookup,
33143314
}
33153315

33163316
return &unirpc.AssetLeaf{
3317-
Asset: rpcAsset,
3318-
IssuanceProof: buf.Bytes(),
3317+
Asset: rpcAsset,
3318+
Proof: buf.Bytes(),
33193319
}, nil
33203320
}
33213321

@@ -3622,7 +3622,7 @@ func unmarshalAssetLeaf(leaf *unirpc.AssetLeaf) (*universe.Leaf, error) {
36223622
// itself.
36233623
var assetProof proof.Proof
36243624
if err := assetProof.Decode(
3625-
bytes.NewReader(leaf.IssuanceProof),
3625+
bytes.NewReader(leaf.Proof),
36263626
); err != nil {
36273627
return nil, err
36283628
}

taprpc/universerpc/universe.pb.go

Lines changed: 379 additions & 380 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

taprpc/universerpc/universe.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,10 @@ message AssetLeaf {
294294

295295
// TODO(roasbeef): only needed for display? can get from proof below ^
296296

297-
// The asset issuance proof, which proves that the asset specified above
298-
// was issued properly. This is always just an individual mint/transfer
299-
// proof and never a proof file.
300-
bytes issuance_proof = 2;
297+
// The asset issuance or transfer proof, which proves that the asset
298+
// specified above was issued or transferred properly. This is always just
299+
// an individual mint/transfer proof and never a proof file.
300+
bytes proof = 2;
301301
}
302302

303303
message AssetLeafResponse {

taprpc/universerpc/universe.swagger.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,10 +1590,10 @@
15901590
"$ref": "#/definitions/taprpcAsset",
15911591
"description": "The asset included in the leaf."
15921592
},
1593-
"issuance_proof": {
1593+
"proof": {
15941594
"type": "string",
15951595
"format": "byte",
1596-
"description": "The asset issuance proof, which proves that the asset specified above\nwas issued properly. This is always just an individual mint/transfer\nproof and never a proof file."
1596+
"description": "The asset issuance or transfer proof, which proves that the asset\nspecified above was issued or transferred properly. This is always just\nan individual mint/transfer proof and never a proof file."
15971597
}
15981598
}
15991599
},

0 commit comments

Comments
 (0)