git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 00d436ed0d3c6e425ef1955e0a39f2cf831fad69

Environment: use block/blockchain consistently

Alex Beregszaszi committed on 8/23/2016, 1:14:33 AM
Parent: ffc7e461609ab3a4b2c3a041acb1124e6fc1c311

Files changed

environment.jschanged
environment.jsView
@@ -1,15 +1,14 @@
11 const U256 = require('./u256.js')
22 const Address = require('./address.js')
33 const Block = require('./block.js')
4-const blockChain = require('./fakeBlockChain.js')
4+const fakeBlockChain = require('./fakeBlockChain.js')
55
66 module.exports = class Environment {
77 constructor (data) {
8- const block = new Block()
9-
108 const defaults = {
11- block: block,
9+ block: new Block(),
10+ blockchain: fakeBlockChain,
1211 // gas tank
1312 gasPrice: 0,
1413 gasLeft: 1000000,
1514 gasRefund: 0,
@@ -51,9 +50,9 @@
5150 return this.state.get(address.toString())['code']
5251 }
5352
5453 getBlockHash (height) {
55- return blockChain.getBlock(height).hash()
54+ return this.blockchain.getBlock(height).hash()
5655 }
5756
5857 // kernal
5958 create (code, value) {

Built with git-ssb-web