-
Notifications
You must be signed in to change notification settings - Fork 67
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
gui: add listcoins
filters
#967
gui: add listcoins
filters
#967
Conversation
Beware that the application use the Coins message passing by to update its cache: One of the main advantages of the new list_coins filter is the outpoints filter, we should use it in the daemon methods that retrieve the coins which outpoints are corresponding to the inputs and the outputs of the resulting HistoryTransaction, Psbt etc |
0391903
to
3419df1
Compare
// TODO: filter for the outpoints in `tx.coins` when this is possible: | ||
// https://github.com/wizardsardine/liana/issues/677 | ||
.list_coins() | ||
.list_coins(&[CoinStatus::Spending], &outpoints) |
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.
we use the outpoint, it is enough, you can remove the status filter. My fear is that the coin exists, just is not yet marked as spending
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 think it's OK to keep the status filter here as the previous filter_map
was already filtering for coins with a non-null spend txid.
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.
Ah you may right, I think we are good then.
// TODO: filter for spending coins when this is possible: | ||
// https://github.com/wizardsardine/liana/issues/677 | ||
.list_coins() | ||
.list_coins(&[CoinStatus::Spending], &outpoints) |
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.
we use the outpoint, it is enough, you can remove the status filter. My fear is that the coin exists, just is not yet marked as spending
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.
As with the other comment, I've kept the status filter.
3419df1
to
1c99376
Compare
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.
ACK 1c99376
This is to resolve #677.
As well as adding the filters to the daemon interface, I've applied filters in separate commits to different sections of the GUI.
This PR builds on changes from #958 and #965. The latter is required when filtering for pending transactions so that a coin whose spending txid changes (e.g. due to RBF) remains as spending.