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

Make sure that all accounts are saved before the end of the transaction #236

Closed
wants to merge 1 commit into from

Conversation

jwasinger
Copy link
Contributor

Fixes #225 .

@holgerd77
Copy link
Member

Is this ready for review?

@cdetrio
Copy link
Contributor

cdetrio commented Nov 30, 2017

Can we create a test case for this before merging the fix?

@jwasinger
Copy link
Contributor Author

jwasinger commented Dec 1, 2017

This is a weird one. I tried to create a test case to cover this but it didn't fail when run through ethereumjs-vm.

My best guess is that, when this scenario occurs in remix/testrpc, the state trie cache is not being flushed properly at the end of the txn, and the account is deleted.

But when run as a state test, somehow this is not the case.

@axic
Copy link
Member

axic commented Dec 11, 2017

A few lines above this code is broken:

   this.cache.getOrLoad(address, function (err, account) {
     cb(err, account.exists)
   })

If err is true then account should be null or undefined and this code would dereference it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contract creates a child contract. Child contract is erroneously deleted by the end of the transaction
5 participants