Skip to content

Commit

Permalink
itest: assert no AltLeaves on mint or address recv
Browse files Browse the repository at this point in the history
  • Loading branch information
jharveyb committed Dec 6, 2024
1 parent a96a16f commit 60fd511
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions itest/addrs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ func testAddresses(t *harnessTest) {
MineBlocks(t.t, t.lndHarness.Miner().Client, 1, 1)
AssertAddrEvent(t.t, secondTapd, newAddr, 1, statusConfirmed)
AssertNonInteractiveRecvComplete(t.t, secondTapd, 4)

// The received asset should have a transition proof with no altLeaves.
emptyLeafMap := make(map[string][]*asset.Asset)
AssertProofAltLeaves(t.t, secondTapd, manualAsset, emptyLeafMap)
}

// testMultiAddress tests that we can send assets to multiple addresses at the
Expand Down
9 changes: 9 additions & 0 deletions itest/assets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ func testMintAssets(t *harnessTest) {
// them, so we don't expect them to show up with script_key_is_local set
// to true in the list of assets.
transferAssetProofs(t, t.tapd, secondTapd, allAssets, false)

// Check that all the imported genesis proofs have no altLeaves.
emptyLeafMap := make(map[string][]*asset.Asset)
for _, asset := range rpcIssuableAssets {
AssertProofAltLeaves(t.t, secondTapd, asset, emptyLeafMap)
}
for _, asset := range rpcSimpleAssets {
AssertProofAltLeaves(t.t, secondTapd, asset, emptyLeafMap)
}
}

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

0 comments on commit 60fd511

Please sign in to comment.