Merge branch 'develop'
This commit is contained in:
commit
98f21669c7
|
@ -1,22 +0,0 @@
|
|||
UNAME = $(shell uname)
|
||||
FILES=qml *.png
|
||||
GOPATH=$(PWD)
|
||||
|
||||
|
||||
# Default is building
|
||||
all:
|
||||
go get -d
|
||||
cp *.go $(GOPATH)/src/github.com/ethereum/go-ethereum
|
||||
cp -r ui $(GOPATH)/src/github.com/ethereum/go-ethereum
|
||||
go build
|
||||
|
||||
install:
|
||||
# Linux build
|
||||
ifeq ($(UNAME),Linux)
|
||||
cp -r assets/* /usr/share/ethereal
|
||||
cp go-ethereum /usr/local/bin/ethereal
|
||||
endif
|
||||
# OS X build
|
||||
ifeq ($(UNAME),Darwin)
|
||||
# Execute py script
|
||||
endif
|
|
@ -1,4 +1,4 @@
|
|||
package ethui
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -124,11 +124,12 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
|
|||
Value: ethutil.Big(valueStr),
|
||||
})
|
||||
vm.Verbose = true
|
||||
vm.Hook = self.Db.halting
|
||||
|
||||
self.Db.done = false
|
||||
self.Logf("callsize %d", len(script))
|
||||
go func() {
|
||||
ret, g, err := callerClosure.Call(vm, data, self.Db.halting)
|
||||
ret, g, err := callerClosure.Call(vm, data)
|
||||
tot := new(big.Int).Mul(g, gasPrice)
|
||||
self.Logf("gas usage %v total price = %v (%v)", g, tot, ethutil.CurrencyToString(tot))
|
||||
if err != nil {
|
|
@ -1,4 +1,4 @@
|
|||
package ethui
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
|
@ -1,4 +1,4 @@
|
|||
package ethui
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -40,8 +40,7 @@ type Gui struct {
|
|||
}
|
||||
|
||||
// Create GUI, but doesn't start it
|
||||
func New(ethereum *eth.Ethereum, session string, logLevel int) *Gui {
|
||||
|
||||
func NewWindow(ethereum *eth.Ethereum, session string, logLevel int) *Gui {
|
||||
db, err := ethdb.NewLDBDatabase("tx_database")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -217,7 +216,9 @@ func (gui *Gui) loadAddressBook() {
|
|||
nameReg := ethpub.EthereumConfig(gui.eth.StateManager()).NameReg()
|
||||
if nameReg != nil {
|
||||
nameReg.State().EachStorage(func(name string, value *ethutil.Value) {
|
||||
gui.win.Root().Call("addAddress", struct{ Name, Address string }{name, ethutil.Bytes2Hex(value.Bytes())})
|
||||
if name[0] != 0 {
|
||||
gui.win.Root().Call("addAddress", struct{ Name, Address string }{name, ethutil.Bytes2Hex(value.Bytes())})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -273,7 +274,11 @@ func (gui *Gui) update() {
|
|||
reactor.Subscribe("newBlock", blockChan)
|
||||
reactor.Subscribe("newTx:pre", txChan)
|
||||
reactor.Subscribe("newTx:post", txChan)
|
||||
//reactor.Subscribe("object:"+string(namereg), objectChan)
|
||||
|
||||
nameReg := ethpub.EthereumConfig(gui.eth.StateManager()).NameReg()
|
||||
if nameReg != nil {
|
||||
reactor.Subscribe("object:"+string(nameReg.Address()), objectChan)
|
||||
}
|
||||
reactor.Subscribe("peerList", peerChan)
|
||||
|
||||
ticker := time.NewTicker(5 * time.Second)
|
|
@ -1,4 +1,4 @@
|
|||
package ethui
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
|
@ -2,7 +2,6 @@ package main
|
|||
|
||||
import (
|
||||
"github.com/ethereum/eth-go/ethlog"
|
||||
"github.com/ethereum/go-ethereum/ethereal/ui"
|
||||
"github.com/ethereum/go-ethereum/utils"
|
||||
"github.com/go-qml/qml"
|
||||
"os"
|
||||
|
@ -47,7 +46,7 @@ func main() {
|
|||
utils.StartRpc(ethereum, RpcPort)
|
||||
}
|
||||
|
||||
gui := ethui.New(ethereum, KeyRing, LogLevel)
|
||||
gui := NewWindow(ethereum, KeyRing, LogLevel)
|
||||
|
||||
utils.RegisterInterrupt(func(os.Signal) {
|
||||
gui.Stop()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ethui
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/ethereum/eth-go/ethchain"
|
|
@ -1,4 +1,4 @@
|
|||
package ethui
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/ethereum/eth-go"
|
Loading…
Reference in New Issue