-
Notifications
You must be signed in to change notification settings - Fork 990
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
API v1/wallet/owner/retrieve_outputs does not return unspent output when tx_id is specified #2637
Comments
I can't reproduce your reported problem on my wallet, my current version is |
@garyyu yeah sure, bare with me, thanks for the quick reply |
Im still receiving this problem on version |
also the parameter must be |
I understand your "problem" now. In current version, that's a designed behavior. When an output is spent, it became a Now I'm thinking whether it's a good idea to add an additional field for example
I suppose only |
Ahhh I see, that makes complete sense @garyyu. Thanks for the detailed description and a way to include the old tx values would definitely be sufficient. So the wider problem is that I need to extract a numerical number of confirmations of the given transaction. The My quesitons is: do you know if there is a better or alternative way to get a numerical count for confirmations? |
btw, please PM me at Gitter :-) @garyyu
I propose you read https://github.com/mimblewimble/docs/wiki/Wallet-API-Guide#transactions--outputs-confirmation-query |
hi, @garyyu |
Hi @zl03jsj, Me and @garyyu continued to discus this problem using the grin support channel. Although this is not ideal, once the output has been spent it is currently impossible to calculate the confirmations because that output no longer exists on the node but you can still safely assume that the transaction has been confirmed due to a newer unspent output existing. So the logic for this could be as follows: calculate confirmations using unspent output height. If this does not exist then check the newly created outputs (that have a higher id than the previous). If one exists then we can assume that the output has been confirmed. The only problem I still have with this is that we still cant get a numerical number to represent 'confirmations'. @garyyu could you provide an insight on this? I see that the feature updaet mimblewimble/grin-wallet#9 to solve this problem was closed? |
very appreciate for your reply @JacobPlaster. yes, what you said is a way to detect weather a transaction is confirmed or not and it would be better to get a way to get a transaction's 'confirmations' thanks again.. (:- |
Describe the bug
The retrieve outputs endpoint does not return the spent outputs when both
show_spent
andtx_id
are set as query parameters.i.e
http://127.0.0.1:3420/v1/wallet/owner/retrieve_outputs?refresh&show_spent&tx_id=0
To Reproduce
Steps to reproduce the behavior:
http://127.0.0.1:3420//v1/wallet/owner/retrieve_outputs?refresh&show_spent&tx_id=0
Relevant Information
When retreiving outputs without sepcifying the
tx_id
but withshow_spent
then the output with id=0 exists in the array of all outputs.Also if the output is unspent, then the above url works fine.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: