Commit 63c9d288b4797cd12ec12e080e84ed2559b14e63
Use constants in Environment
Alex Beregszaszi committed on 8/3/2016, 10:09:22 PMParent: cb095bce6e57caeb9ca92d94f1ec0b3c44f08c08
Files changed
environment.js | changed |
environment.js | ||
---|---|---|
@@ -1,6 +1,6 @@ | ||
1 | 1 | const Graph = require('generic-digraph') |
2 | -const MAX_BAL_BYTES = require('./constants.js').MAX_BAL_BYTES | |
2 | +const constants = require('./constants.js') | |
3 | 3 | |
4 | 4 | module.exports = class Environment { |
5 | 5 | constructor (data) { |
6 | 6 | const defaults = { |
@@ -8,14 +8,14 @@ | ||
8 | 8 | gasPrice: 0, |
9 | 9 | gasLimit: 0, // The gas limit for the block |
10 | 10 | gasRefund: 0, |
11 | 11 | // call infromation |
12 | - address: new Uint8Array(20), | |
13 | - origin: new Uint8Array(20), | |
14 | - coinbase: new Uint8Array(20), | |
12 | + address: new Uint8Array(constants.ADD_SIZE_BYTES), | |
13 | + origin: new Uint8Array(constants.ADD_SIZE_BYTES), | |
14 | + coinbase: new Uint8Array(constants.ADD_SIZE_BYTES), | |
15 | 15 | difficulty: new Uint8Array(20), |
16 | - caller: new Uint8Array(20), | |
17 | - callValue: new Uint8Array(MAX_BAL_BYTES), | |
16 | + caller: new Uint8Array(constants.ADD_SIZE_BYTES), | |
17 | + callValue: new Uint8Array(constants.MAX_BAL_BYTES), | |
18 | 18 | callData: new ArrayBuffer(), |
19 | 19 | // the ROM |
20 | 20 | code: new ArrayBuffer(), // the current running code |
21 | 21 | // output calls |
Built with git-ssb-web