ethereumjs / ethereumjs-monorepo

@@ -36,10 +36,9 @@
Loading
36 36
   * Needs to be called from the subclass constructor
37 37
   */
38 38
  constructor(_opts: DefaultStateManagerOpts) {
39 -
    // Safeguard if "process" is not available (browser)
40 -
    if (typeof process?.env.DEBUG !== 'undefined') {
41 -
      this.DEBUG = true
42 -
    }
39 +
    // Skip DEBUG calls unless 'ethjs' included in environmental DEBUG variables
40 +
    this.DEBUG = process?.env?.DEBUG?.includes('ethjs') ?? false
41 +
43 42
    this._debug = createDebugLogger('statemanager:statemanager')
44 43
  }
45 44

@@ -19,7 +19,7 @@
Loading
19 19
 * Block: ${block.header.number}
20 20
 * Hardfork: ${execution.hardfork}
21 21
 *
22 -
 * Run with: DEBUG=vm:*:*,vm:*,-vm:ops:* ts-node [SCRIPT_NAME].ts
22 +
 * Run with: DEBUG=ethjs,vm:*:*,vm:*,-vm:ops:* ts-node [SCRIPT_NAME].ts
23 23
 *
24 24
 */
25 25

@@ -151,10 +151,8 @@
Loading
151 151
      promisify(this.events.emit.bind(this.events))
152 152
    )
153 153
154 -
    // Safeguard if "process" is not available (browser)
155 -
    if (process !== undefined && typeof process.env.DEBUG !== 'undefined') {
156 -
      this.DEBUG = true
157 -
    }
154 +
    // Skip DEBUG calls unless 'ethjs' included in environmental DEBUG variables
155 +
    this.DEBUG = process?.env?.DEBUG?.includes('ethjs') ?? false
158 156
  }
159 157
160 158
  async init(): Promise<void> {

@@ -298,10 +298,8 @@
Loading
298 298
      promisify(this.events.emit.bind(this.events))
299 299
    )
300 300
301 -
    // Safeguard if "process" is not available (browser)
302 -
    if (typeof process?.env.DEBUG !== 'undefined') {
303 -
      this.DEBUG = true
304 -
    }
301 +
    // Skip DEBUG calls unless 'ethjs' included in environmental DEBUG variables
302 +
    this.DEBUG = process?.env?.DEBUG?.includes('ethjs') ?? false
305 303
  }
306 304
307 305
  protected async init(): Promise<void> {

@@ -47,10 +47,9 @@
Loading
47 47
    this._accessedStorage = [new Map()]
48 48
    this._accessedStorageReverted = [new Map()]
49 49
50 -
    // Safeguard if "process" is not available (browser)
51 -
    if (process !== undefined && typeof process.env.DEBUG !== 'undefined') {
52 -
      this.DEBUG = true
53 -
    }
50 +
    // Skip DEBUG calls unless 'ethjs' included in environmental DEBUG variables
51 +
    this.DEBUG = process?.env?.DEBUG?.includes('ethjs') ?? false
52 +
54 53
    this._debug = createDebugLogger('vm:state')
55 54
  }
56 55

@@ -41,10 +41,8 @@
Loading
41 41
      this._nextForkBlock = c.nextHardforkBlock(this._hardfork) ?? BigInt(0)
42 42
    }
43 43
44 -
    // Safeguard if "process" is not available (browser)
45 -
    if (process !== undefined && typeof process.env.DEBUG !== 'undefined') {
46 -
      this.DEBUG = true
47 -
    }
44 +
    // Skip DEBUG calls unless 'ethjs' included in environmental DEBUG variables
45 +
    this.DEBUG = process?.env?.DEBUG?.includes('ethjs') ?? false
48 46
  }
49 47
50 48
  static eth62 = { name: 'eth', version: 62, length: 8, constructor: ETH }
Files Coverage
packages 87.58%
Project Totals (198 files) 87.58%
1
coverage:
2
  status:
3
    project:
4
      default:
5
        target: auto
6
        threshold: 2%
7
    patch:
8
      default:
9
        target: auto
10
        threshold: 5%
11
comment:
12
  layout: 'reach, flags'
13
flags:
14
  rlp:
15
    carryforward: true
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading