EVM: check for 'ethjs' DEVUG variable
vm: check for 'ethjs' DEBUG variable
devp2p: check for 'ethjs' DEVUG variable
statemanager: : check for 'ethjs' DEBUG variable
Update test scripts with 'ethjs' DEBUG variable
Showing 6 of 11 files from the diff.
Newly tracked file
packages/statemanager/src/baseStateManager.ts
changed.
packages/client/lib/util/debug.ts
changed.
packages/vm/src/vm.ts
changed.
packages/evm/src/evm.ts
changed.
packages/vm/src/eei/vmState.ts
changed.
Newly tracked file
packages/devp2p/src/protocol/eth.ts
changed.
Other files ignored by Codecov
packages/devp2p/README.md
has changed.
packages/vm/README.md
has changed.
packages/client/README.md
has changed.
packages/evm/README.md
has changed.
packages/client/examples/local-debugging.md
has changed.
@@ -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 |
@@ -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% |
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.