Skip to content

Commit 57c369c

Browse files
jharveybguggero
authored andcommitted
itest: assert no AltLeaves on mint or address recv
1 parent 3c58c07 commit 57c369c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

itest/addrs_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ func testAddresses(t *harnessTest) {
242242
MineBlocks(t.t, t.lndHarness.Miner().Client, 1, 1)
243243
AssertAddrEvent(t.t, secondTapd, newAddr, 1, statusConfirmed)
244244
AssertNonInteractiveRecvComplete(t.t, secondTapd, 4)
245+
246+
// The received asset should have a transition proof with no altLeaves.
247+
emptyLeafMap := make(map[string][]*asset.Asset)
248+
AssertProofAltLeaves(t.t, secondTapd, manualAsset, emptyLeafMap)
245249
}
246250

247251
// testMultiAddress tests that we can send assets to multiple addresses at the

itest/assets_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@ func testMintAssets(t *harnessTest) {
150150
// them, so we don't expect them to show up with script_key_is_local set
151151
// to true in the list of assets.
152152
transferAssetProofs(t, t.tapd, secondTapd, allAssets, false)
153+
154+
// Check that all the imported genesis proofs have no altLeaves.
155+
emptyLeafMap := make(map[string][]*asset.Asset)
156+
for _, asset := range rpcIssuableAssets {
157+
AssertProofAltLeaves(t.t, secondTapd, asset, emptyLeafMap)
158+
}
159+
for _, asset := range rpcSimpleAssets {
160+
AssertProofAltLeaves(t.t, secondTapd, asset, emptyLeafMap)
161+
}
153162
}
154163

155164
// testMintBatchResume tests that we're able to create a pending batch, restart

0 commit comments

Comments
 (0)