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

virtual_op in operation_history_object? #206

Closed
vikramrajkumar opened this issue Jan 18, 2017 · 0 comments
Closed

virtual_op in operation_history_object? #206

vikramrajkumar opened this issue Jan 18, 2017 · 0 comments

Comments

@vikramrajkumar
Copy link
Contributor

From @abitmore on March 31, 2016 11:37

There is a virtual_op field in operation_history_object, related code is here. Questions:

  • what's the supposed use case of this data? I noticed recently it's used in GUI to sort account history, which is introduced as a fix of issue 793.
  • however, in witness_node, this data is filled with the variable _current_virtual_op in database.hpp with this code, but _current_virtual_op has never been saved to or loaded from disk. So if witness_node is started without --replay-blockchain, _current_virtual_op is reset to 0, then every new operation_history_object saved to database contains a virtual_op value which would be already assigned to an old operation_history_object, thus the logic in above fix is not totally reliable.

Thoughts?

//Edit: logic in the GUI fix is correct, because it compares block_num first, then compares virtual_op.

Copied from original issue: cryptonomex/graphene#644

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