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
5374a95c
Commit
5374a95c
authored
May 26, 2014
by
Maran
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com:ethereum/go-ethereum into develop
parents
36683f2e
26ecf4b7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
21 deletions
+33
-21
README.md
README.md
+1
-1
wallet.qml
ethereal/assets/qml/wallet.qml
+4
-5
gui.go
ethereal/ui/gui.go
+13
-8
ui_lib.go
ethereal/ui/ui_lib.go
+1
-1
config.go
ethereum/config.go
+1
-2
repl.go
ethereum/repl.go
+12
-3
repl_darwin.go
ethereum/repl_darwin.go
+1
-1
No files found.
README.md
View file @
5374a95c
...
...
@@ -5,7 +5,7 @@ Ethereum
Ethereum Go Client © 2014 Jeffrey Wilcke.
Current state: Proof of Concept 5.0 RC
8
.
Current state: Proof of Concept 5.0 RC
9
.
For the development package please see the
[
eth-go package
](
https://github.com/ethereum/eth-go
)
.
...
...
ethereal/assets/qml/wallet.qml
View file @
5374a95c
...
...
@@ -86,7 +86,6 @@ ApplicationWindow {
//color: "#D9DDE7"
color
:
"#252525"
ColumnLayout
{
y
:
50
anchors.left
:
parent
.
left
...
...
@@ -156,6 +155,7 @@ ApplicationWindow {
TableView
{
id
:
txTableView
anchors.fill
:
parent
TableViewColumn
{
role
:
"inout"
;
title
:
""
;
width
:
40
}
TableViewColumn
{
role
:
"value"
;
title
:
"Value"
;
width
:
100
}
TableViewColumn
{
role
:
"address"
;
title
:
"Address"
;
width
:
430
}
TableViewColumn
{
role
:
"contract"
;
title
:
"Contract"
;
width
:
100
}
...
...
@@ -405,7 +405,7 @@ ApplicationWindow {
anchors.left
:
aboutIcon
.
right
anchors.leftMargin
:
10
font.pointSize
:
12
text
:
"<h2>Ethereal</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes<br>
<h3>Binary Distribution</h3>Jarrad Hope<br>
"
text
:
"<h2>Ethereal</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes<br>"
}
}
...
...
@@ -430,7 +430,6 @@ ApplicationWindow {
}
}
SplitView
{
anchors.fill
:
parent
property
var
asmModel
:
ListModel
{
id
:
asmModel
...
...
@@ -525,14 +524,14 @@ ApplicationWindow {
walletValueLabel
.
text
=
value
}
function
addTx
(
tx
)
{
function
addTx
(
tx
,
inout
)
{
var
isContract
if
(
tx
.
contract
==
true
){
isContract
=
"Yes"
}
else
{
isContract
=
"No"
}
txModel
.
insert
(
0
,
{
hash
:
tx
.
hash
,
address
:
tx
.
address
,
value
:
tx
.
value
,
contract
:
isContract
})
txModel
.
insert
(
0
,
{
inout
:
inout
,
hash
:
tx
.
hash
,
address
:
tx
.
address
,
value
:
tx
.
value
,
contract
:
isContract
})
}
function
addBlock
(
block
)
{
...
...
ethereal/ui/gui.go
View file @
5374a95c
...
...
@@ -9,7 +9,6 @@ import (
"github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethutil"
"github.com/go-qml/qml"
"github.com/obscuren/mutan"
"math/big"
"strings"
)
...
...
@@ -55,7 +54,7 @@ func New(ethereum *eth.Ethereum) *Gui {
}
func
(
gui
*
Gui
)
Start
(
assetPath
string
)
{
const
version
=
"0.5.0 RC
8
"
const
version
=
"0.5.0 RC
9
"
defer
gui
.
txDb
.
Close
()
...
...
@@ -152,7 +151,15 @@ func (gui *Gui) readPreviousTransactions() {
for
it
.
Next
()
{
tx
:=
ethchain
.
NewTransactionFromBytes
(
it
.
Value
())
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
))
var
inout
string
if
bytes
.
Compare
(
tx
.
Sender
(),
gui
.
addr
)
==
0
{
inout
=
"send"
}
else
{
inout
=
"recv"
}
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
),
inout
)
}
it
.
Release
()
}
...
...
@@ -208,12 +215,12 @@ func (gui *Gui) update() {
object
:=
state
.
GetAccount
(
gui
.
addr
)
if
bytes
.
Compare
(
tx
.
Sender
(),
gui
.
addr
)
==
0
{
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
))
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
)
,
"send"
)
gui
.
txDb
.
Put
(
tx
.
Hash
(),
tx
.
RlpEncode
())
unconfirmedFunds
.
Sub
(
unconfirmedFunds
,
tx
.
Value
)
}
else
if
bytes
.
Compare
(
tx
.
Recipient
,
gui
.
addr
)
==
0
{
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
))
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
)
,
"recv"
)
gui
.
txDb
.
Put
(
tx
.
Hash
(),
tx
.
RlpEncode
())
unconfirmedFunds
.
Add
(
unconfirmedFunds
,
tx
.
Value
)
...
...
@@ -262,7 +269,5 @@ func (gui *Gui) Transact(recipient, value, gas, gasPrice, data string) (*ethpub.
func
(
gui
*
Gui
)
Create
(
recipient
,
value
,
gas
,
gasPrice
,
data
string
)
(
*
ethpub
.
PReceipt
,
error
)
{
keyPair
:=
ethutil
.
GetKeyRing
()
.
Get
(
0
)
mainInput
,
initInput
:=
mutan
.
PreParse
(
data
)
return
gui
.
pub
.
Create
(
ethutil
.
Hex
(
keyPair
.
PrivateKey
),
value
,
gas
,
gasPrice
,
initInput
,
mainInput
)
return
gui
.
pub
.
Create
(
ethutil
.
Hex
(
keyPair
.
PrivateKey
),
value
,
gas
,
gasPrice
,
data
)
}
ethereal/ui/ui_lib.go
View file @
5374a95c
...
...
@@ -135,7 +135,7 @@ func (ui *UiLib) DebugTx(recipient, valueStr, gasStr, gasPriceStr, data string)
for
_
,
str
:=
range
dis
{
ui
.
win
.
Root
()
.
Call
(
"setAsm"
,
str
)
}
callerTx
:=
ethchain
.
NewContractCreationTx
(
ethutil
.
Big
(
valueStr
),
ethutil
.
Big
(
gasStr
),
ethutil
.
Big
(
gasPriceStr
),
callerScript
,
nil
)
callerTx
:=
ethchain
.
NewContractCreationTx
(
ethutil
.
Big
(
valueStr
),
ethutil
.
Big
(
gasStr
),
ethutil
.
Big
(
gasPriceStr
),
nil
)
// Contract addr as test address
keyPair
:=
ethutil
.
GetKeyRing
()
.
Get
(
0
)
...
...
ethereum/config.go
View file @
5374a95c
...
...
@@ -31,7 +31,7 @@ func Init() {
flag
.
PrintDefaults
()
}
flag
.
StringVar
(
&
Identifier
,
"i"
,
""
,
"
C
ustom client identifier"
)
flag
.
StringVar
(
&
Identifier
,
"i"
,
""
,
"
c
ustom client identifier"
)
flag
.
BoolVar
(
&
StartMining
,
"m"
,
false
,
"start dagger mining"
)
flag
.
BoolVar
(
&
ShowGenesis
,
"g"
,
false
,
"prints genesis header and exits"
)
flag
.
BoolVar
(
&
StartRpc
,
"r"
,
false
,
"start rpc server"
)
...
...
@@ -47,7 +47,6 @@ func Init() {
flag
.
StringVar
(
&
ImportKey
,
"import"
,
""
,
"imports the given private key (hex)"
)
flag
.
IntVar
(
&
MaxPeer
,
"x"
,
10
,
"maximum desired peers"
)
flag
.
BoolVar
(
&
StartJsConsole
,
"js"
,
false
,
"exp"
)
//flag.StringVar(&InputFile, "e", "", "Run javascript file")
flag
.
Parse
()
...
...
ethereum/repl.go
View file @
5374a95c
...
...
@@ -48,13 +48,22 @@ func (self *JSRepl) parseInput(code string) {
// The JSEthereum object attempts to wrap the PEthereum object and returns
// meaningful javascript objects
type
JSBlock
struct
{
*
ethpub
.
PBlock
eth
*
JSEthereum
}
func
(
self
*
JSBlock
)
GetTransaction
(
hash
string
)
otto
.
Value
{
return
self
.
eth
.
toVal
(
self
.
PBlock
.
GetTransaction
(
hash
))
}
type
JSEthereum
struct
{
*
ethpub
.
PEthereum
vm
*
otto
.
Otto
}
func
(
self
*
JSEthereum
)
GetBlock
(
hash
string
)
otto
.
Value
{
return
self
.
toVal
(
self
.
PEthereum
.
GetBlock
(
hash
)
)
return
self
.
toVal
(
&
JSBlock
{
self
.
PEthereum
.
GetBlock
(
hash
),
self
}
)
}
func
(
self
*
JSEthereum
)
GetKey
()
otto
.
Value
{
...
...
@@ -76,8 +85,8 @@ func (self *JSEthereum) Transact(key, recipient, valueStr, gasStr, gasPriceStr,
return
self
.
toVal
(
r
)
}
func
(
self
*
JSEthereum
)
Create
(
key
,
valueStr
,
gasStr
,
gasPriceStr
,
initStr
,
body
Str
string
)
otto
.
Value
{
r
,
err
:=
self
.
PEthereum
.
Create
(
key
,
valueStr
,
gasStr
,
gasPriceStr
,
initStr
,
body
Str
)
func
(
self
*
JSEthereum
)
Create
(
key
,
valueStr
,
gasStr
,
gasPriceStr
,
script
Str
string
)
otto
.
Value
{
r
,
err
:=
self
.
PEthereum
.
Create
(
key
,
valueStr
,
gasStr
,
gasPriceStr
,
script
Str
)
if
err
!=
nil
{
fmt
.
Println
(
err
)
...
...
ethereum/repl_darwin.go
View file @
5374a95c
...
...
@@ -102,7 +102,7 @@ L:
break
L
}
addHistory
(
str
)
//allow user to recall this line
addHistory
(
str
[
:
len
(
str
)
-
1
]
)
//allow user to recall this line
self
.
parseInput
(
str
)
...
...
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