Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
3c377a66
Commit
3c377a66
authored
Apr 22, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't use checkpoint anymore
parent
45515594
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
execution-context.ts
libs/remix-lib/src/execution/execution-context.ts
+2
-7
No files found.
libs/remix-lib/src/execution/execution-context.ts
View file @
3c377a66
...
@@ -63,13 +63,7 @@ async getStateRoot (force: boolean = false): Promise<Buffer> {
...
@@ -63,13 +63,7 @@ async getStateRoot (force: boolean = false): Promise<Buffer> {
// throw new Error('Cannot get state root with uncommitted checkpoints')
// throw new Error('Cannot get state root with uncommitted checkpoints')
}
}
/*
try {
await
this
.
_cache
.
flush
()
await
this
.
_cache
.
flush
()
} catch (e) {
console.error(e)
}
*/
const
stateRoot
=
this
.
_trie
.
root
const
stateRoot
=
this
.
_trie
.
root
return
stateRoot
return
stateRoot
...
@@ -152,7 +146,6 @@ export class ExecutionContext {
...
@@ -152,7 +146,6 @@ export class ExecutionContext {
createVm
(
hardfork
)
{
createVm
(
hardfork
)
{
const
stateManager
=
new
StateManagerCommonStorageDump
()
const
stateManager
=
new
StateManagerCommonStorageDump
()
stateManager
.
checkpoint
()
const
common
=
new
Common
({
chain
:
'mainnet'
,
hardfork
})
const
common
=
new
Common
({
chain
:
'mainnet'
,
hardfork
})
const
vm
=
new
VM
({
const
vm
=
new
VM
({
common
,
common
,
...
@@ -253,9 +246,11 @@ export class ExecutionContext {
...
@@ -253,9 +246,11 @@ export class ExecutionContext {
if
(
!
infoCb
)
infoCb
=
()
=>
{}
if
(
!
infoCb
)
infoCb
=
()
=>
{}
if
(
context
===
'vm'
)
{
if
(
context
===
'vm'
)
{
this
.
executionContext
=
context
this
.
executionContext
=
context
/*
this.vms[this.currentFork].stateManager.revert().then(() => {
this.vms[this.currentFork].stateManager.revert().then(() => {
this.vms[this.currentFork].stateManager.checkpoint()
this.vms[this.currentFork].stateManager.checkpoint()
})
})
*/
this
.
event
.
trigger
(
'contextChanged'
,
[
'vm'
])
this
.
event
.
trigger
(
'contextChanged'
,
[
'vm'
])
return
cb
()
return
cb
()
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment