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

Cache.flush: Cannot read property 'modified' of undefined #81

Closed
jesusdiazvico opened this issue Aug 12, 2016 · 2 comments
Closed

Cache.flush: Cannot read property 'modified' of undefined #81

jesusdiazvico opened this issue Aug 12, 2016 · 2 comments

Comments

@jesusdiazvico
Copy link

Cache.flush (invoked by runCode) throws:

/home/test/evm/node_modules/ethereumjs-vm/lib/cache.js:89
    if (it.value.modified) {
          ^

TypeError: Cannot read property 'modified' of undefined
    at /home/test/evm/node_modules/ethereumjs-vm/lib/cache.js:89:33
    at Object.async.whilst (/home/test/evm/node_modules/ethereumjs-vm/node_modules/async/lib/async.js:792:13)
    at Cache.flush (/home/test/evm/node_modules/ethereumjs-vm/lib/cache.js:86:9)
    at parseVmResults (/home/test/evm/node_modules/ethereumjs-vm/lib/runCode.js:234:31)
    at /home/test/evm/node_modules/ethereumjs-vm/node_modules/async/lib/async.js:789:30
    at /home/test/evm/node_modules/ethereumjs-vm/node_modules/async/lib/async.js:167:37
    at processImmediate [as _immediateCallback] (timers.js:383:17)

Of course, just adding "it.value &&" as precondition in the if prevents the error, but I'm not sure if it breaks something else...

@holgerd77
Copy link
Member

Experimented a bit with this, not really sure what to do with it. What is the functionality of the populateCache option and in what context would this be used? Am I correct that this is deactivated atm? Would be nice if anyone can drop a note.

@andrevmatos
Copy link
Contributor

Getting it with ganache-cli, trying to mine 500 blocks in a loop. Adding the validation above makes it run without error, but it's annoying anyway.

holgerd77 added a commit that referenced this issue Jan 9, 2018
Fix #81 by checking it.value is valid
evertonfraga added a commit to evertonfraga/ethereumjs-vm that referenced this issue Dec 16, 2019
holgerd77 added a commit to holgerd77/ethereumjs-vm that referenced this issue Nov 30, 2020
…nstructions

Add instructions for updating diagram
holgerd77 pushed a commit that referenced this issue Dec 1, 2020
Add eth_protocolVersion and modularize createNode in tests
holgerd77 added a commit that referenced this issue Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants