git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 89c0461616621d14c849ba592bac2c9ca85978d9

Environment: call to the parent environment where needed

Alex Beregszaszi committed on 8/26/2016, 11:46:57 PM
Parent: 3cb8a54180de3ba70e81bfebcd2e944557d99715

Files changed

environment.jschanged
environment.jsView
@@ -37,22 +37,22 @@
3737 account.set('nonce', trie.nonce || new U256(0))
3838 account.set('balance', trie.balance || new U256(0))
3939 account.set('code', trie.code || new Uint8Array())
4040 account.set('storage', trie.storage || new Map())
41- this.state.set(address.toString(), account)
41+ this.parent.state.set(address.toString(), account)
4242 }
4343
4444 getBalance (address) {
45- const account = this.state.get(address.toString())
45+ const account = this.parent.state.get(address.toString())
4646 if (account) {
4747 return account.get('balance')
4848 } else {
4949 return new U256()
5050 }
5151 }
5252
5353 getCode (address) {
54- const account = this.state.get(address.toString())
54+ const account = this.parent.state.get(address.toString())
5555 if (account) {
5656 return account.get('code')
5757 } else {
5858 return Uint8Array.from(new Buffer([]))

Built with git-ssb-web