Skip to content
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

chia get_transactions does not return all change transactions, so tx_removals doesn't sum up correctly. #11

Open
bobsixtyfour opened this issue Mar 12, 2023 · 1 comment

Comments

@bobsixtyfour
Copy link

Not sure this project is active anymore but I'm leaving this message as a FYI
I've noticed an issue with chia get_transactions, it doesn't return all the additions/removals. So the script might say you have a transaction with 1.75 xch instead of 8.

Not sure what the purpose of manually adding the individual additions/removals, but commenting out the loop that counted those fixed it for me.

@steppsr
Copy link
Owner

steppsr commented Mar 12, 2023

I haven't heard about Chia CLI not returning all the removals properly. Admittedly, I haven't tested it recently.

But for the summing the removals, it is necessary on Outgoing transactions to account for the 'change' back from the transaction. The amount alone can't be used because it includes the change back coins.

For example, if you went to a store and your total was $12, but all you had was two $10 bills, you'd give two $10s to the store and they'd give you back one $5 bill and three $1 bills. If you don't account for the "20" going out, your total would be 4 (12 out minus the 8 change back... which isn't correct. I'm not sure why Chia reports it this way). You might check some of your Outgoing Transactions to make sure this scenario is accounted for properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants