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
c67cdab2
Commit
c67cdab2
authored
Jun 23, 2014
by
zelig
Browse files
Options
Browse Files
Download
Plain Diff
merge upstream
parents
d060ae6a
2408e382
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
57 deletions
+7
-57
README.md
README.md
+1
-1
samplecoin.html
ethereal/assets/samplecoin/samplecoin.html
+2
-2
debugger.go
ethereal/ui/debugger.go
+3
-2
gui.go
ethereal/ui/gui.go
+1
-1
ui_lib.go
ethereal/ui/ui_lib.go
+0
-51
No files found.
README.md
View file @
c67cdab2
...
@@ -5,7 +5,7 @@ Ethereum
...
@@ -5,7 +5,7 @@ Ethereum
Ethereum Go Client © 2014 Jeffrey Wilcke.
Ethereum Go Client © 2014 Jeffrey Wilcke.
Current state: Proof of Concept 5.0 RC1
3
.
Current state: Proof of Concept 5.0 RC1
4
.
For the development package please see the
[
eth-go package
](
https://github.com/ethereum/eth-go
)
.
For the development package please see the
[
eth-go package
](
https://github.com/ethereum/eth-go
)
.
...
...
ethereal/assets/samplecoin/samplecoin.html
View file @
c67cdab2
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
jefcoinAddr
=
"
de0bd4ea1947deabf1749d7ed633f289358c9f6c
"
var
jefcoinAddr
=
"
22fa3ebce6ef9ca661a960104d3087eec040011e
"
var
mAddr
=
""
var
mAddr
=
""
function
createTransaction
()
{
function
createTransaction
()
{
...
@@ -17,7 +17,7 @@ function createTransaction() {
...
@@ -17,7 +17,7 @@ function createTransaction() {
var
amount
=
document
.
querySelector
(
"#amount"
).
value
.
pad
(
32
);
var
amount
=
document
.
querySelector
(
"#amount"
).
value
.
pad
(
32
);
var
data
=
(
addr
+
amount
).
unbin
();
var
data
=
(
addr
+
amount
).
unbin
();
eth
.
transact
(
mAddr
,
jefcoinAddr
,
0
,
"
10000000"
,
"25
0"
,
data
,
function
(
receipt
)
{
eth
.
transact
(
mAddr
,
jefcoinAddr
,
0
,
"
50000"
,
"100000
0"
,
data
,
function
(
receipt
)
{
debug
(
"received tx hash:"
,
reciept
.
address
)
debug
(
"received tx hash:"
,
reciept
.
address
)
})
})
}
}
...
...
ethereal/ui/debugger.go
View file @
c67cdab2
...
@@ -78,7 +78,6 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
...
@@ -78,7 +78,6 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
var
err
error
var
err
error
script
:=
ethutil
.
StringToByteFunc
(
scriptStr
,
func
(
s
string
)
(
ret
[]
byte
)
{
script
:=
ethutil
.
StringToByteFunc
(
scriptStr
,
func
(
s
string
)
(
ret
[]
byte
)
{
ret
,
err
=
ethutil
.
Compile
(
s
)
ret
,
err
=
ethutil
.
Compile
(
s
)
fmt
.
Printf
(
"%x
\n
"
,
ret
)
return
return
})
})
...
@@ -110,14 +109,16 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
...
@@ -110,14 +109,16 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
block
:=
self
.
lib
.
eth
.
BlockChain
()
.
CurrentBlock
block
:=
self
.
lib
.
eth
.
BlockChain
()
.
CurrentBlock
vm
:=
ethchain
.
NewVm
(
state
,
self
.
lib
.
eth
.
StateManager
(),
ethchain
.
RuntimeVars
{
vm
:=
ethchain
.
NewVm
(
state
,
self
.
lib
.
eth
.
StateManager
(),
ethchain
.
RuntimeVars
{
Block
:
block
,
Origin
:
account
.
Address
(),
Origin
:
account
.
Address
(),
BlockNumber
:
block
.
BlockInfo
()
.
Number
,
BlockNumber
:
block
.
Number
,
PrevHash
:
block
.
PrevHash
,
PrevHash
:
block
.
PrevHash
,
Coinbase
:
block
.
Coinbase
,
Coinbase
:
block
.
Coinbase
,
Time
:
block
.
Time
,
Time
:
block
.
Time
,
Diff
:
block
.
Difficulty
,
Diff
:
block
.
Difficulty
,
Value
:
ethutil
.
Big
(
valueStr
),
Value
:
ethutil
.
Big
(
valueStr
),
})
})
vm
.
Verbose
=
true
self
.
Db
.
done
=
false
self
.
Db
.
done
=
false
self
.
Logf
(
"callsize %d"
,
len
(
script
))
self
.
Logf
(
"callsize %d"
,
len
(
script
))
...
...
ethereal/ui/gui.go
View file @
c67cdab2
...
@@ -60,7 +60,7 @@ func New(ethereum *eth.Ethereum, logLevel ethlog.LogLevel) *Gui {
...
@@ -60,7 +60,7 @@ func New(ethereum *eth.Ethereum, logLevel ethlog.LogLevel) *Gui {
}
}
func
(
gui
*
Gui
)
Start
(
assetPath
string
)
{
func
(
gui
*
Gui
)
Start
(
assetPath
string
)
{
const
version
=
"0.5.0 RC1
3
"
const
version
=
"0.5.0 RC1
4
"
defer
gui
.
txDb
.
Close
()
defer
gui
.
txDb
.
Close
()
...
...
ethereal/ui/ui_lib.go
View file @
c67cdab2
...
@@ -3,7 +3,6 @@ package ethui
...
@@ -3,7 +3,6 @@ package ethui
import
(
import
(
"bitbucket.org/kardianos/osext"
"bitbucket.org/kardianos/osext"
"github.com/ethereum/eth-go"
"github.com/ethereum/eth-go"
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/ethutil"
"github.com/go-qml/qml"
"github.com/go-qml/qml"
"os"
"os"
...
@@ -138,53 +137,3 @@ func DefaultAssetPath() string {
...
@@ -138,53 +137,3 @@ func DefaultAssetPath() string {
return
base
return
base
}
}
func
(
ui
*
UiLib
)
DebugTx
(
recipient
,
valueStr
,
gasStr
,
gasPriceStr
,
data
string
)
{
state
:=
ui
.
eth
.
BlockChain
()
.
CurrentBlock
.
State
()
script
,
err
:=
ethutil
.
Compile
(
data
)
if
err
!=
nil
{
logger
.
Debugln
(
err
)
return
}
dis
:=
ethchain
.
Disassemble
(
script
)
ui
.
win
.
Root
()
.
Call
(
"clearAsm"
)
for
_
,
str
:=
range
dis
{
ui
.
win
.
Root
()
.
Call
(
"setAsm"
,
str
)
}
// Contract addr as test address
keyPair
:=
ethutil
.
GetKeyRing
()
.
Get
(
0
)
callerTx
:=
ethchain
.
NewContractCreationTx
(
ethutil
.
Big
(
valueStr
),
ethutil
.
Big
(
gasStr
),
ethutil
.
Big
(
gasPriceStr
),
script
)
callerTx
.
Sign
(
keyPair
.
PrivateKey
)
account
:=
ui
.
eth
.
StateManager
()
.
TransState
()
.
GetStateObject
(
keyPair
.
Address
())
contract
:=
ethchain
.
MakeContract
(
callerTx
,
state
)
callerClosure
:=
ethchain
.
NewClosure
(
account
,
contract
,
contract
.
Init
(),
state
,
ethutil
.
Big
(
gasStr
),
ethutil
.
Big
(
gasPriceStr
))
block
:=
ui
.
eth
.
BlockChain
()
.
CurrentBlock
vm
:=
ethchain
.
NewVm
(
state
,
ui
.
eth
.
StateManager
(),
ethchain
.
RuntimeVars
{
Origin
:
account
.
Address
(),
BlockNumber
:
block
.
BlockInfo
()
.
Number
,
PrevHash
:
block
.
PrevHash
,
Coinbase
:
block
.
Coinbase
,
Time
:
block
.
Time
,
Diff
:
block
.
Difficulty
,
})
ui
.
Db
.
done
=
false
go
func
()
{
callerClosure
.
Call
(
vm
,
contract
.
Init
(),
ui
.
Db
.
halting
)
state
.
Reset
()
ui
.
Db
.
done
=
true
}()
}
func
(
ui
*
UiLib
)
Next
()
{
ui
.
Db
.
Next
()
}
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