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

More transaction metadata #4

Closed
lukechampine opened this issue Aug 31, 2019 · 1 comment
Closed

More transaction metadata #4

lukechampine opened this issue Aug 31, 2019 · 1 comment

Comments

@lukechampine
Copy link
Owner

/transactions/:id currently reports the inflow, outflow, and feePerByte in addition to the raw transaction. Those things are nice, but having the block height, block id, and timestamp would be far more useful.

This shouldn't be too tough to implement. wallet.ProcessedConsensusChange turns a consensus change into a flat []types.Transaction, so that type would just need to be changed to include the block-specific metadata. Then the implementers of wallet.ChainStore would need to store this extra information.

The tricky part is handling future changes. It's not hard to imagine that we'll want to add additional metadata later. When we do, will all the existing stores need to run some upgrade code? Will some of their transactions end up with missing metadata? Not sure how best to handle this.

@lukechampine
Copy link
Owner Author

Implemented in lukechampine/us@f35d97a and 6625a86

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