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

Unable to spend large transaction #12

Open
Manbearpixel opened this issue Jun 29, 2019 · 0 comments
Open

Unable to spend large transaction #12

Manbearpixel opened this issue Jun 29, 2019 · 0 comments

Comments

@Manbearpixel
Copy link
Member

User reported not being able to send a relatively large ODIN transaction. Investigation led to the discovery that Unspent transaction values are not being stored properly.

Transaction values are generally stored as value * 1e8 to account for possible 8 units of decimal places. So 1.0 Ø is represented as 100000000 Ø.

SQLITE was storing this with magic numbers at the end such as 100002356 which would mess up the assumed change from a spend.

The fix introduced here would save these values as raw text and then convert to a number on load. To implement this fix, I also needed to create some sort of "Migration" functionality for future use-cases where the original or loaded database schema may need to change post-launch.

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

1 participant