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
6f09a3e8
Commit
6f09a3e8
authored
Jun 23, 2014
by
zelig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix imports in ui_lib and flags cos of defaultAssetPath move; fix logLevel type for gui
parent
34284b75
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
11 deletions
+17
-11
flags.go
ethereal/flags.go
+14
-1
main.go
ethereal/main.go
+1
-4
gui.go
ethereal/ui/gui.go
+2
-2
ui_lib.go
ethereal/ui/ui_lib.go
+0
-4
No files found.
ethereal/flags.go
View file @
6f09a3e8
package
main
import
(
"fmt"
"os"
"os/user"
"path"
"github.com/ethereum/eth-go/ethlog"
"flag"
"bitbucket.org/kardianos/osext"
"path/filepath"
"runtime"
)
var
Identifier
string
...
...
@@ -59,6 +67,11 @@ func defaultDataDir() string {
var
defaultConfigFile
=
path
.
Join
(
defaultDataDir
(),
"conf.ini"
)
func
Init
()
{
flag
.
Usage
=
func
()
{
fmt
.
Fprintf
(
os
.
Stderr
,
"%s [options] [filename]:
\n
options precedence: default < config file < environment variables < command line"
,
os
.
Args
[
0
])
flag
.
PrintDefaults
()
}
flag
.
StringVar
(
&
Identifier
,
"id"
,
""
,
"Custom client identifier"
)
flag
.
StringVar
(
&
OutboundPort
,
"port"
,
"30303"
,
"listening port"
)
flag
.
BoolVar
(
&
UseUPnP
,
"upnp"
,
false
,
"enable UPnP support"
)
...
...
@@ -75,7 +88,7 @@ func Init() {
flag
.
StringVar
(
&
ConfigFile
,
"conf"
,
defaultConfigFile
,
"config file"
)
flag
.
StringVar
(
&
DebugFile
,
"debug"
,
""
,
"debug file (no debugging if not set)"
)
flag
.
IntVar
(
&
LogLevel
,
"loglevel"
,
int
(
ethlog
.
InfoLevel
),
"loglevel: 0-4: silent,error,warn,info,debug)"
)
flag
.
StringVar
(
&
AssetPath
,
"asset_path"
,
defaultAssetPath
,
"absolute path to GUI assets directory"
)
flag
.
StringVar
(
&
AssetPath
,
"asset_path"
,
defaultAssetPath
()
,
"absolute path to GUI assets directory"
)
flag
.
Parse
()
}
ethereal/main.go
View file @
6f09a3e8
package
main
import
(
"fmt"
"github.com/ethereum/go-ethereum/ethereal/ui"
"github.com/ethereum/go-ethereum/utils"
"github.com/go-qml/qml"
"runtime"
)
const
Debug
=
true
func
main
()
{
qml
.
Init
(
nil
)
...
...
@@ -38,6 +35,6 @@ func main() {
utils
.
StartEthereum
(
ethereum
,
UseSeed
)
gui
:=
ethui
.
New
(
ethereum
,
l
ogLevel
)
gui
:=
ethui
.
New
(
ethereum
,
L
ogLevel
)
gui
.
Start
(
AssetPath
)
}
ethereal/ui/gui.go
View file @
6f09a3e8
...
...
@@ -40,7 +40,7 @@ type Gui struct {
}
// Create GUI, but doesn't start it
func
New
(
ethereum
*
eth
.
Ethereum
,
logLevel
ethlog
.
LogLevel
)
*
Gui
{
func
New
(
ethereum
*
eth
.
Ethereum
,
logLevel
int
)
*
Gui
{
lib
:=
&
EthLib
{
stateManager
:
ethereum
.
StateManager
(),
blockChain
:
ethereum
.
BlockChain
(),
txPool
:
ethereum
.
TxPool
()}
db
,
err
:=
ethdb
.
NewLDBDatabase
(
"tx_database"
)
if
err
!=
nil
{
...
...
@@ -56,7 +56,7 @@ func New(ethereum *eth.Ethereum, logLevel ethlog.LogLevel) *Gui {
pub
:=
ethpub
.
NewPEthereum
(
ethereum
)
return
&
Gui
{
eth
:
ethereum
,
lib
:
lib
,
txDb
:
db
,
addr
:
addr
,
pub
:
pub
,
logLevel
:
logLevel
}
return
&
Gui
{
eth
:
ethereum
,
lib
:
lib
,
txDb
:
db
,
addr
:
addr
,
pub
:
pub
,
logLevel
:
ethlog
.
LogLevel
(
logLevel
)
}
}
func
(
gui
*
Gui
)
Start
(
assetPath
string
)
{
...
...
ethereal/ui/ui_lib.go
View file @
6f09a3e8
package
ethui
import
(
"bitbucket.org/kardianos/osext"
"github.com/ethereum/eth-go"
"github.com/ethereum/eth-go/ethutil"
"github.com/go-qml/qml"
"os"
"path"
"path/filepath"
"runtime"
)
type
memAddr
struct
{
...
...
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