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
5ab0eaa0
Commit
5ab0eaa0
authored
Feb 26, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
52ccaa60
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
132 additions
and
69 deletions
+132
-69
account_manager.go
accounts/account_manager.go
+1
-0
api.go
rpc/api.go
+113
-33
world.go
xeth/world.go
+0
-32
xeth.go
xeth/xeth.go
+18
-4
No files found.
accounts/account_manager.go
View file @
5ab0eaa0
...
...
@@ -34,6 +34,7 @@ package accounts
import
(
crand
"crypto/rand"
"github.com/ethereum/go-ethereum/crypto"
)
...
...
rpc/api.go
View file @
5ab0eaa0
This diff is collapsed.
Click to expand it.
xeth/world.go
deleted
100644 → 0
View file @
52ccaa60
package
xeth
import
"github.com/ethereum/go-ethereum/state"
type
State
struct
{
xeth
*
XEth
}
func
NewState
(
xeth
*
XEth
)
*
State
{
return
&
State
{
xeth
}
}
func
(
self
*
State
)
State
()
*
state
.
StateDB
{
return
self
.
xeth
.
chainManager
.
TransState
()
}
func
(
self
*
State
)
Get
(
addr
string
)
*
Object
{
return
&
Object
{
self
.
State
()
.
GetStateObject
(
fromHex
(
addr
))}
}
func
(
self
*
State
)
SafeGet
(
addr
string
)
*
Object
{
return
&
Object
{
self
.
safeGet
(
addr
)}
}
func
(
self
*
State
)
safeGet
(
addr
string
)
*
state
.
StateObject
{
object
:=
self
.
State
()
.
GetStateObject
(
fromHex
(
addr
))
if
object
==
nil
{
object
=
state
.
NewStateObject
(
fromHex
(
addr
),
self
.
xeth
.
eth
.
Db
())
}
return
object
}
xeth/xeth.go
View file @
5ab0eaa0
...
...
@@ -17,6 +17,7 @@ import (
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/miner"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/whisper"
)
...
...
@@ -54,13 +55,26 @@ func New(eth Backend) *XEth {
whisper
:
NewWhisper
(
eth
.
Whisper
()),
miner
:
eth
.
Miner
(),
}
xeth
.
state
=
NewState
(
xeth
)
xeth
.
state
=
NewState
(
xeth
,
xeth
.
chainManager
.
TransState
()
)
return
xeth
}
func
(
self
*
XEth
)
Backend
()
Backend
{
return
self
.
eth
}
func
(
self
*
XEth
)
State
()
*
State
{
return
self
.
state
}
func
(
self
*
XEth
)
Backend
()
Backend
{
return
self
.
eth
}
func
(
self
*
XEth
)
UseState
(
statedb
*
state
.
StateDB
)
*
XEth
{
xeth
:=
&
XEth
{
eth
:
self
.
eth
,
blockProcessor
:
self
.
blockProcessor
,
chainManager
:
self
.
chainManager
,
whisper
:
self
.
whisper
,
miner
:
self
.
miner
,
}
xeth
.
state
=
NewState
(
xeth
,
statedb
)
return
xeth
}
func
(
self
*
XEth
)
State
()
*
State
{
return
self
.
state
}
func
(
self
*
XEth
)
Whisper
()
*
Whisper
{
return
self
.
whisper
}
func
(
self
*
XEth
)
Miner
()
*
miner
.
Miner
{
return
self
.
miner
}
...
...
@@ -229,7 +243,7 @@ func (self *XEth) Call(toStr, valueStr, gasStr, gasPriceStr, dataStr string) (st
}
var
(
statedb
=
self
.
chainManager
.
TransState
()
statedb
=
self
.
State
()
.
State
()
//self.
chainManager.TransState()
key
=
self
.
eth
.
KeyManager
()
.
KeyPair
()
from
=
statedb
.
GetOrNewStateObject
(
key
.
Address
())
block
=
self
.
chainManager
.
CurrentBlock
()
...
...
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