-
Notifications
You must be signed in to change notification settings - Fork 138
itest: limit asset lists when minting and asserting mints #1842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -453,6 +453,9 @@ func FinalizeBatchUnconfirmed(t *testing.T, minerClient *rpcclient.Client, | |
ctxt, &taprpc.ListAssetRequest{ | ||
IncludeUnconfirmedMints: true, | ||
ScriptKeyType: allScriptKeysQuery, | ||
AnchorOutpoint: &taprpc.OutPoint{ | ||
Txid: hashes[0][:], | ||
}, | ||
Comment on lines
+456
to
+458
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the change in |
||
}, | ||
) | ||
require.NoError(t, err) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
AnchorOutpoint
field is being initialized with only aTxid
, which means theOutputIndex
will default to 0. If theListAssets
RPC handler performs a strict outpoint match, this will fail to find assets if they are anchored in an output other than index 0. While this might work for current test cases, it could lead to flaky tests in the future if minting transactions start using different output indices. It would be more robust to explicitly specify the output index if it's known, or confirm that the RPC handler correctly interprets a zero-valueOutputIndex
as a wildcard for any output within the transaction. If the output index is not available here, perhaps theListAssets
RPC should be enhanced to filter bytxid
directly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally included an explicit 0 index, but removed it, deeming it superfluous.