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
0bdb0a9d
Commit
0bdb0a9d
authored
May 30, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ini file for ethereum. fixes #66
parent
65c5a20e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
17 deletions
+43
-17
wallet.qml
ethereal/assets/qml/wallet.qml
+22
-15
ethereum.go
ethereal/ethereum.go
+1
-1
gui.go
ethereal/ui/gui.go
+9
-0
ethereum.go
ethereum/ethereum.go
+11
-1
No files found.
ethereal/assets/qml/wallet.qml
View file @
0bdb0a9d
...
@@ -221,25 +221,32 @@ ApplicationWindow {
...
@@ -221,25 +221,32 @@ ApplicationWindow {
color
:
"#00000000"
color
:
"#00000000"
anchors.fill
:
parent
anchors.fill
:
parent
Column
{
spacing
:
3
anchors.fill
:
parent
anchors.topMargin
:
5
anchors.leftMargin
:
5
Label
{
Label
{
id
:
addressLabel
id
:
addressLabel
text
:
"Address"
text
:
"Address"
anchors
{
margins
:
5
top
:
parent
.
top
left
:
parent
.
left
}
}
}
TextField
{
TextField
{
anchors
{
margins
:
5
left
:
addressLabel
.
right
top
:
parent
.
top
}
text
:
pub
.
getKey
().
address
text
:
pub
.
getKey
().
address
width
:
500
width
:
500
}
}
Label
{
text
:
"Client ID"
}
TextField
{
text
:
eth
.
clientId
()
onTextChanged
:
{
eth
.
changeClientId
(
text
)
}
}
}
property
var
addressModel
:
ListModel
{
property
var
addressModel
:
ListModel
{
id
:
addressModel
id
:
addressModel
...
...
ethereal/ethereum.go
View file @
0bdb0a9d
...
@@ -50,7 +50,7 @@ func main() {
...
@@ -50,7 +50,7 @@ func main() {
}
else
{
}
else
{
g
.
ParseAll
()
g
.
ParseAll
()
}
}
ethutil
.
ReadConfig
(
".ethereal"
,
ethutil
.
LogFile
|
ethutil
.
LogStd
,
Identifier
)
ethutil
.
ReadConfig
(
".ethereal"
,
ethutil
.
LogFile
|
ethutil
.
LogStd
,
g
,
Identifier
)
// Instantiated a eth stack
// Instantiated a eth stack
ethereum
,
err
:=
eth
.
New
(
eth
.
CapDefault
,
UseUPnP
)
ethereum
,
err
:=
eth
.
New
(
eth
.
CapDefault
,
UseUPnP
)
...
...
ethereal/ui/gui.go
View file @
0bdb0a9d
...
@@ -67,6 +67,7 @@ func (gui *Gui) Start(assetPath string) {
...
@@ -67,6 +67,7 @@ func (gui *Gui) Start(assetPath string) {
}})
}})
ethutil
.
Config
.
SetClientString
(
fmt
.
Sprintf
(
"/Ethereal v%s"
,
version
))
ethutil
.
Config
.
SetClientString
(
fmt
.
Sprintf
(
"/Ethereal v%s"
,
version
))
// Create a new QML engine
// Create a new QML engine
gui
.
engine
=
qml
.
NewEngine
()
gui
.
engine
=
qml
.
NewEngine
()
context
:=
gui
.
engine
.
Context
()
context
:=
gui
.
engine
.
Context
()
...
@@ -315,3 +316,11 @@ func (gui *Gui) Create(recipient, value, gas, gasPrice, data string) (*ethpub.PR
...
@@ -315,3 +316,11 @@ func (gui *Gui) Create(recipient, value, gas, gasPrice, data string) (*ethpub.PR
return
gui
.
pub
.
Transact
(
ethutil
.
Hex
(
keyPair
.
PrivateKey
),
recipient
,
value
,
gas
,
gasPrice
,
data
)
return
gui
.
pub
.
Transact
(
ethutil
.
Hex
(
keyPair
.
PrivateKey
),
recipient
,
value
,
gas
,
gasPrice
,
data
)
}
}
func
(
gui
*
Gui
)
ChangeClientId
(
id
string
)
{
ethutil
.
Config
.
SetIdentifier
(
id
)
}
func
(
gui
*
Gui
)
ClientId
()
string
{
return
ethutil
.
Config
.
Identifier
}
ethereum/ethereum.go
View file @
0bdb0a9d
...
@@ -6,10 +6,12 @@ import (
...
@@ -6,10 +6,12 @@ import (
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/go-ethereum/utils"
"github.com/ethereum/go-ethereum/utils"
"github.com/rakyll/globalconf"
"io/ioutil"
"io/ioutil"
"log"
"log"
"os"
"os"
"os/signal"
"os/signal"
"path"
"runtime"
"runtime"
"strings"
"strings"
)
)
...
@@ -59,7 +61,15 @@ func main() {
...
@@ -59,7 +61,15 @@ func main() {
lt
=
ethutil
.
LogFile
|
ethutil
.
LogStd
lt
=
ethutil
.
LogFile
|
ethutil
.
LogStd
}
}
ethutil
.
ReadConfig
(
".ethereum"
,
lt
,
Identifier
)
g
,
err
:=
globalconf
.
NewWithOptions
(
&
globalconf
.
Options
{
Filename
:
path
.
Join
(
ethutil
.
ApplicationFolder
(
".ethereal"
),
"conf.ini"
),
})
if
err
!=
nil
{
fmt
.
Println
(
err
)
}
else
{
g
.
ParseAll
()
}
ethutil
.
ReadConfig
(
".ethereum"
,
lt
,
g
,
Identifier
)
logger
:=
ethutil
.
Config
.
Log
logger
:=
ethutil
.
Config
.
Log
...
...
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