Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
1fb56eb9
Commit
1fb56eb9
authored
Oct 29, 2021
by
George Hotz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set nodeurl with env var
parent
468e8d19
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
main.go
minigeth/main.go
+6
-0
embedded_mips.go
minigeth/oracle/embedded_mips.go
+1
-0
prefetch.go
minigeth/oracle/prefetch.go
+4
-1
No files found.
minigeth/main.go
View file @
1fb56eb9
...
...
@@ -37,6 +37,12 @@ func main() {
defer
pprof
.
StopCPUProfile
()
}
newNodeUrl
,
setNewNodeUrl
:=
os
.
LookupEnv
(
"NODE"
)
if
setNewNodeUrl
{
fmt
.
Println
(
"override node url"
,
newNodeUrl
)
oracle
.
SetNodeUrl
(
newNodeUrl
)
}
// non mips
if
len
(
os
.
Args
)
>
1
{
pkw
:=
oracle
.
PreimageKeyValueWriter
{}
...
...
minigeth/oracle/embedded_mips.go
View file @
1fb56eb9
...
...
@@ -95,6 +95,7 @@ func Preimage(hash common.Hash) []byte {
}
// these are stubs in embedded world
func
SetNodeUrl
(
newNodeUrl
string
)
{}
func
SetRoot
(
newRoot
string
)
{}
func
PrefetchStorage
(
*
big
.
Int
,
common
.
Address
,
common
.
Hash
,
func
(
map
[
common
.
Hash
][]
byte
))
{}
func
PrefetchAccount
(
*
big
.
Int
,
common
.
Address
,
func
(
map
[
common
.
Hash
][]
byte
))
{}
...
...
minigeth/oracle/prefetch.go
View file @
1fb56eb9
...
...
@@ -79,9 +79,12 @@ type Account struct {
CodeHash
[]
byte
}
//var nodeUrl = "http://192.168.1.213:8545"
var
nodeUrl
=
"https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
func
SetNodeUrl
(
newNodeUrl
string
)
{
nodeUrl
=
newNodeUrl
}
func
toFilename
(
key
string
)
string
{
return
fmt
.
Sprintf
(
"%s/json_%s"
,
root
,
key
)
}
...
...
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