Skip to content

Commit 65629e7

Browse files
committed
itest: extend supply commit ignore test with leaf fetch and validate
Extend the supply commit ignore test to include basic fetching and validation of ignore leaves.
1 parent 04875c8 commit 65629e7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

itest/supply_commit_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,25 @@ func testSupplyCommitIgnoreAsset(t *harnessTest) {
390390
// to the supply commitment delegation key for signing.
391391
_, err = secondTapd.IgnoreAssetOutPoint(ctxb, ignoreReq)
392392
require.ErrorContains(t.t, err, "delegation key locator not found")
393+
394+
// Fetch the supply leaves to ensure that the ignored asset outpoint is
395+
// included in the supply leaves.
396+
//
397+
// nolint: lll
398+
respLeaves, err := t.tapd.FetchSupplyLeaves(
399+
ctxb, &unirpc.FetchSupplyLeavesRequest{
400+
GroupKey: &unirpc.FetchSupplyLeavesRequest_GroupKeyBytes{
401+
GroupKeyBytes: groupKeyBytes,
402+
},
403+
},
404+
)
405+
require.NoError(t.t, err)
406+
require.NotNil(t.t, respLeaves)
407+
408+
require.Len(t.t, respLeaves.IgnoreLeaves, 1)
409+
require.EqualValues(
410+
t.t, respLeaves.IgnoreLeaves[0].LeafNode.RootSum, 10,
411+
)
393412
}
394413

395414
// AssertInclusionProof checks that the inclusion proof for a given leaf key

0 commit comments

Comments
 (0)