Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
张蕾
Geth-Modification
Commits
f21eb88a
Commit
f21eb88a
authored
Mar 20, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor updates
parent
c642094c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
config.go
ethutil/config.go
+5
-1
parsing.go
ethutil/parsing.go
+9
-1
trie_test.go
ethutil/trie_test.go
+1
-0
No files found.
ethutil/config.go
View file @
f21eb88a
...
...
@@ -50,12 +50,16 @@ func ReadConfig(base string) *config {
Config
=
&
config
{
ExecPath
:
path
,
Debug
:
true
,
Ver
:
"0.3.1"
}
Config
.
Log
=
NewLogger
(
LogFile
|
LogStd
,
LogLevelDebug
)
Config
.
ClientString
=
fmt
.
Sprintf
(
"/Ethereum(G) v%s/%s"
,
Config
.
Ver
,
runtime
.
GOOS
)
Config
.
SetClientString
(
"/Ethereum(G)"
)
}
return
Config
}
func
(
c
*
config
)
SetClientString
(
str
string
)
{
Config
.
ClientString
=
fmt
.
Sprintf
(
"%s nv%s/%s"
,
str
,
c
.
Ver
,
runtime
.
GOOS
)
}
type
LoggerType
byte
const
(
...
...
ethutil/parsing.go
View file @
f21eb88a
...
...
@@ -58,6 +58,10 @@ var OpCodes = map[string]byte{
"BALANCE"
:
0x3c
,
"MKTX"
:
0x3d
,
"SUICIDE"
:
0x3f
,
// TODO FIX OPCODES
"CALL"
:
0x40
,
"RETURN"
:
0x41
,
}
func
IsOpCode
(
s
string
)
bool
{
...
...
@@ -76,7 +80,11 @@ func CompileInstr(s string) ([]byte, error) {
}
num
:=
new
(
big
.
Int
)
num
.
SetString
(
s
,
0
)
_
,
success
:=
num
.
SetString
(
s
,
0
)
// Assume regular bytes during compilation
if
!
success
{
num
.
SetBytes
([]
byte
(
s
))
}
return
num
.
Bytes
(),
nil
}
...
...
ethutil/trie_test.go
View file @
f21eb88a
package
ethutil
import
(
"fmt"
"reflect"
"testing"
)
...
...
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