good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
a977f3c0
Commit
a977f3c0
authored
Jun 17, 2015
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
xeth, tests: fixed api
parent
30b27336
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/block_test_util.go
+1
-1
1 addition, 1 deletion
tests/block_test_util.go
xeth/types.go
+4
-4
4 additions, 4 deletions
xeth/types.go
xeth/xeth.go
+1
-1
1 addition, 1 deletion
xeth/xeth.go
with
6 additions
and
6 deletions
tests/block_test_util.go
+
1
−
1
View file @
a977f3c0
...
@@ -124,7 +124,7 @@ func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, erro
...
@@ -124,7 +124,7 @@ func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, erro
obj
.
SetBalance
(
balance
)
obj
.
SetBalance
(
balance
)
obj
.
SetNonce
(
nonce
)
obj
.
SetNonce
(
nonce
)
for
k
,
v
:=
range
acct
.
Storage
{
for
k
,
v
:=
range
acct
.
Storage
{
statedb
.
SetState
(
common
.
HexToAddress
(
addrString
),
common
.
HexToHash
(
k
),
common
.
FromHex
(
v
))
statedb
.
SetState
(
common
.
HexToAddress
(
addrString
),
common
.
HexToHash
(
k
),
common
.
HexToHash
(
v
))
}
}
}
}
// sync objects to trie
// sync objects to trie
...
...
This diff is collapsed.
Click to expand it.
xeth/types.go
+
4
−
4
View file @
a977f3c0
...
@@ -22,7 +22,7 @@ func NewObject(state *state.StateObject) *Object {
...
@@ -22,7 +22,7 @@ func NewObject(state *state.StateObject) *Object {
return
&
Object
{
state
}
return
&
Object
{
state
}
}
}
func
(
self
*
Object
)
StorageString
(
str
string
)
*
common
.
Valu
e
{
func
(
self
*
Object
)
StorageString
(
str
string
)
[]
byt
e
{
if
common
.
IsHex
(
str
)
{
if
common
.
IsHex
(
str
)
{
return
self
.
storage
(
common
.
Hex2Bytes
(
str
[
2
:
]))
return
self
.
storage
(
common
.
Hex2Bytes
(
str
[
2
:
]))
}
else
{
}
else
{
...
@@ -30,12 +30,12 @@ func (self *Object) StorageString(str string) *common.Value {
...
@@ -30,12 +30,12 @@ func (self *Object) StorageString(str string) *common.Value {
}
}
}
}
func
(
self
*
Object
)
StorageValue
(
addr
*
common
.
Value
)
*
common
.
Valu
e
{
func
(
self
*
Object
)
StorageValue
(
addr
*
common
.
Value
)
[]
byt
e
{
return
self
.
storage
(
addr
.
Bytes
())
return
self
.
storage
(
addr
.
Bytes
())
}
}
func
(
self
*
Object
)
storage
(
addr
[]
byte
)
*
common
.
Valu
e
{
func
(
self
*
Object
)
storage
(
addr
[]
byte
)
[]
byt
e
{
return
self
.
StateObject
.
GetSt
orag
e
(
common
.
B
igD
(
addr
)
)
return
self
.
StateObject
.
GetSt
at
e
(
common
.
B
ytesToHash
(
addr
))
.
Bytes
(
)
}
}
func
(
self
*
Object
)
Storage
()
(
storage
map
[
string
]
string
)
{
func
(
self
*
Object
)
Storage
()
(
storage
map
[
string
]
string
)
{
...
...
This diff is collapsed.
Click to expand it.
xeth/xeth.go
+
1
−
1
View file @
a977f3c0
...
@@ -488,7 +488,7 @@ func (self *XEth) NumberToHuman(balance string) string {
...
@@ -488,7 +488,7 @@ func (self *XEth) NumberToHuman(balance string) string {
}
}
func
(
self
*
XEth
)
StorageAt
(
addr
,
storageAddr
string
)
string
{
func
(
self
*
XEth
)
StorageAt
(
addr
,
storageAddr
string
)
string
{
return
common
.
ToHex
(
self
.
State
()
.
state
.
GetState
(
common
.
HexToAddress
(
addr
),
common
.
HexToHash
(
storageAddr
)))
return
self
.
State
()
.
state
.
GetState
(
common
.
HexToAddress
(
addr
),
common
.
HexToHash
(
storageAddr
))
.
Hex
(
)
}
}
func
(
self
*
XEth
)
BalanceAt
(
addr
string
)
string
{
func
(
self
*
XEth
)
BalanceAt
(
addr
string
)
string
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment