Skip to content

Commit edd52b3

Browse files
committed
itest: limit asset list when asserting mint
AssertAssetsMinted previously listed all confirmed assets known to a client, then checking that any specific assets (to have been minted in a specific transaction) were included in this confirmed asset list. The ListAssets request could time out prematurely if many assets were known to a client, e.g. in load testing. This change limits the confirmed assets requested only to whatever was included in the 0th output of the supplied minting transaction. Any supplied asset requests are then checked for inclusion in that set.
1 parent e892603 commit edd52b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

itest/assertions.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,9 +2093,13 @@ func AssertAssetsMinted(t *testing.T, tapClient commands.RpcClientsBundle,
20932093
assetList []*taprpc.Asset
20942094
)
20952095

2096+
// List only the assets that were minted in the anchor transaction.
20962097
listRespConfirmed, err := tapClient.ListAssets(
20972098
ctxt, &taprpc.ListAssetRequest{
20982099
ScriptKeyType: allScriptKeysQuery,
2100+
AnchorOutpoint: &taprpc.OutPoint{
2101+
Txid: mintTXID[:],
2102+
},
20992103
},
21002104
)
21012105
require.NoError(t, err)

0 commit comments

Comments
 (0)