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

Apply deterministic virtual_op numbering rule #1676

Merged
merged 2 commits into from
Apr 10, 2019
Merged

Conversation

abitmore
Copy link
Member

@@ -61,7 +61,7 @@ namespace graphene { namespace chain {
/** the operation within the transaction */
uint16_t op_in_trx = 0;
/** any virtual operations implied by operation in block */
uint16_t virtual_op = 0;
uint32_t virtual_op = 0;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason for this change: it's not too hard to create more than 65536 virtual operations in a block.

@pmconrad
Copy link
Contributor

Hm, I think you're resetting to 0 in too many places...
It should be sufficient to reset _current_virtual_op in apply_transaction before each apply_operation, and reset _current_op and _current_virtual_op in apply_block after applying all transactions.

@abitmore
Copy link
Member Author

Force-pushed.

pmconrad
pmconrad previously approved these changes Mar 26, 2019
Resolved conflicts:
- libraries/chain/include/graphene/chain/config.hpp : bumped GRAPHENE_CURRENT_DB_VERSION to current date
@abitmore
Copy link
Member Author

abitmore commented Apr 3, 2019

Merged develop branch to resolve conflict on DB_VERSION. Please review again.

@pmconrad pmconrad merged commit 860d241 into develop Apr 10, 2019
@pmconrad pmconrad deleted the vop-numbering branch April 10, 2019 06:54
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

Successfully merging this pull request may close these issues.

2 participants