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

Eth invoke expression tx #656

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft

Eth invoke expression tx #656

wants to merge 29 commits into from

Conversation

esuwu
Copy link
Contributor

@esuwu esuwu commented Jan 24, 2022

No description provided.

@esuwu esuwu added the wip This is a WIP, should not be merged right away label Jan 24, 2022
@esuwu esuwu changed the base branch from master to invoke-expression-tx January 24, 2022 22:22
Base automatically changed from invoke-expression-tx to master January 27, 2022 14:07
esuwu and others added 3 commits January 28, 2022 14:16
* Added new entities for InvokeScript and InvokeExpression

* Deleted a useless comment

* Fixed tests and style

* Deleted copies of code

* Fixed tests

* Fixed a very important mistake

* Fixed ethereum invoke tx tests

* Changed comments
@esuwu esuwu requested review from nickeskov and removed request for nickeskov February 7, 2022 14:10
Comment on lines +362 to +366
_, isEthInvokeScript := ethTx.TxKind.(*proto.EthereumInvokeScriptTxKind)
_, isEthInvokeExpression := ethTx.TxKind.(*proto.EthereumInvokeExpressionTxKind)
if !(isEthInvokeScript || isEthInvokeExpression) {
return errors.New("performing transaction was called, but the transaction is not InvokeScript or InvokeExpression")
}
Copy link
Member

Choose a reason for hiding this comment

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

Use switch case

@nickeskov nickeskov self-requested a review February 8, 2022 08:14
@nickeskov nickeskov force-pushed the eth-invoke-expression-tx branch from db2b705 to 2278dd8 Compare February 8, 2022 08:15
Comment on lines -362 to +366
if _, ok := ethTx.TxKind.(*proto.EthereumInvokeScriptTxKind); ok {
if err := tp.stor.commitUncertain(info.blockID); err != nil {
return errors.Wrap(err, "failed to commit invoke changes")
}
_, isEthInvokeScript := ethTx.TxKind.(*proto.EthereumInvokeScriptTxKind)
_, isEthInvokeExpression := ethTx.TxKind.(*proto.EthereumInvokeExpressionTxKind)
if !(isEthInvokeScript || isEthInvokeExpression) {
return errors.New("performing transaction was called, but the transaction is not InvokeScript or InvokeExpression")
}
Copy link
Member

Choose a reason for hiding this comment

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

These changes break compatibility with old logic

@nickeskov nickeskov removed the wip This is a WIP, should not be merged right away label May 21, 2022
@nickeskov nickeskov marked this pull request as draft May 21, 2022 12:34
@nickeskov nickeskov added do not merge The PR is not ready to be merged wip This is a WIP, should not be merged right away labels May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge The PR is not ready to be merged wip This is a WIP, should not be merged right away
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants