aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-22 21:25:33 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-22 21:25:33 +0800
commitd186bf0dfece955feb797dda2b53cae8c89b786c (patch)
treec913a30268071eb3e831a79b109c5a29728d19d4 /cmd/mist
parent9682a3ef3ec72a871708a9bba1133fa59b58ccb5 (diff)
downloaddexon-d186bf0dfece955feb797dda2b53cae8c89b786c.tar
dexon-d186bf0dfece955feb797dda2b53cae8c89b786c.tar.gz
dexon-d186bf0dfece955feb797dda2b53cae8c89b786c.tar.bz2
dexon-d186bf0dfece955feb797dda2b53cae8c89b786c.tar.lz
dexon-d186bf0dfece955feb797dda2b53cae8c89b786c.tar.xz
dexon-d186bf0dfece955feb797dda2b53cae8c89b786c.tar.zst
dexon-d186bf0dfece955feb797dda2b53cae8c89b786c.zip
Fix Mist types build errors
Diffstat (limited to 'cmd/mist')
-rw-r--r--cmd/mist/bindings.go2
-rw-r--r--cmd/mist/gui.go11
-rw-r--r--cmd/mist/html_container.go4
-rw-r--r--cmd/mist/qml_container.go3
4 files changed, 10 insertions, 10 deletions
diff --git a/cmd/mist/bindings.go b/cmd/mist/bindings.go
index 5d08e7dd7..5d45d927e 100644
--- a/cmd/mist/bindings.go
+++ b/cmd/mist/bindings.go
@@ -67,7 +67,7 @@ func (self *Gui) DumpState(hash, path string) {
i, _ := strconv.Atoi(hash[1:])
block = self.eth.ChainManager().GetBlockByNumber(uint64(i))
} else {
- block = self.eth.ChainManager().GetBlock(common.Hex2Bytes(hash))
+ block = self.eth.ChainManager().GetBlock(common.HexToHash(hash))
}
if block == nil {
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index 19ad09454..08f02f833 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -31,11 +31,11 @@ import (
"sort"
"time"
+ "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/ethdb"
- "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/ui/qt/qwhisper"
"github.com/ethereum/go-ethereum/xeth"
@@ -230,7 +230,8 @@ func (self *Gui) loadMergedMiningOptions() {
func (gui *Gui) insertTransaction(window string, tx *types.Transaction) {
var inout string
- if gui.eth.AccountManager().HasAccount(tx.From()) {
+ from, _ := tx.From()
+ if gui.eth.AccountManager().HasAccount(common.Hex2Bytes(from.Hex())) {
inout = "send"
} else {
inout = "recv"
@@ -238,8 +239,8 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) {
var (
ptx = xeth.NewTx(tx)
- send = common.Bytes2Hex(tx.From())
- rec = common.Bytes2Hex(tx.To())
+ send = from.Hex()
+ rec = tx.To().Hex()
)
ptx.Sender = send
ptx.Address = rec
@@ -263,7 +264,7 @@ func (gui *Gui) readPreviousTransactions() {
}
func (gui *Gui) processBlock(block *types.Block, initial bool) {
- name := common.Bytes2Hex(block.Coinbase())
+ name := block.Coinbase().Hex()
b := xeth.NewBlock(block)
b.Name = name
diff --git a/cmd/mist/html_container.go b/cmd/mist/html_container.go
index 195e81073..7c948885a 100644
--- a/cmd/mist/html_container.go
+++ b/cmd/mist/html_container.go
@@ -29,8 +29,8 @@ import (
"path"
"path/filepath"
- "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/xeth"
"github.com/howeyc/fsnotify"
"github.com/obscuren/qml"
@@ -139,7 +139,7 @@ func (app *HtmlApplication) Window() *qml.Window {
}
func (app *HtmlApplication) NewBlock(block *types.Block) {
- b := &xeth.Block{Number: int(block.NumberU64()), Hash: common.Bytes2Hex(block.Hash())}
+ b := &xeth.Block{Number: int(block.NumberU64()), Hash: block.Hash().Hex()}
app.webView.Call("onNewBlockCb", b)
}
diff --git a/cmd/mist/qml_container.go b/cmd/mist/qml_container.go
index 778ef0e40..f2cabb474 100644
--- a/cmd/mist/qml_container.go
+++ b/cmd/mist/qml_container.go
@@ -25,7 +25,6 @@ import (
"runtime"
"github.com/ethereum/go-ethereum/core/types"
- "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/xeth"
"github.com/obscuren/qml"
)
@@ -68,7 +67,7 @@ func (app *QmlApplication) NewWatcher(quitChan chan bool) {
// Events
func (app *QmlApplication) NewBlock(block *types.Block) {
- pblock := &xeth.Block{Number: int(block.NumberU64()), Hash: common.Bytes2Hex(block.Hash())}
+ pblock := &xeth.Block{Number: int(block.NumberU64()), Hash: block.Hash().Hex()}
app.win.Call("onNewBlockCb", pblock)
}