diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-31 17:59:17 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-31 17:59:17 +0800 |
commit | 3ee0461cb5b6e4a5e2d287180afbdb681805a662 (patch) | |
tree | f245667a9e3f5f0ff23bb1c89f4f7cc783f4949c /cmd/mist/gui.go | |
parent | 8e0a39f33f9d24ebeca9cc88edf24cc6294552d7 (diff) | |
download | dexon-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar dexon-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.gz dexon-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.bz2 dexon-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.lz dexon-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.xz dexon-3ee0461cb5b6e4a5e2d287180afbdb681805a662.tar.zst dexon-3ee0461cb5b6e4a5e2d287180afbdb681805a662.zip |
Moved ethchain to chain
Diffstat (limited to 'cmd/mist/gui.go')
-rw-r--r-- | cmd/mist/gui.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index e6da33475..c917ad06e 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -31,7 +31,7 @@ import ( "time" "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/ethchain" + "github.com/ethereum/go-ethereum/chain" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethlog" "github.com/ethereum/go-ethereum/ethminer" @@ -286,7 +286,7 @@ func (gui *Gui) loadAddressBook() { } } -func (gui *Gui) insertTransaction(window string, tx *ethchain.Transaction) { +func (gui *Gui) insertTransaction(window string, tx *chain.Transaction) { pipe := ethpipe.New(gui.eth) nameReg := pipe.World().Config().Get("NameReg") addr := gui.address() @@ -336,7 +336,7 @@ func (gui *Gui) insertTransaction(window string, tx *ethchain.Transaction) { func (gui *Gui) readPreviousTransactions() { it := gui.txDb.Db().NewIterator(nil, nil) for it.Next() { - tx := ethchain.NewTransactionFromBytes(it.Value()) + tx := chain.NewTransactionFromBytes(it.Value()) gui.insertTransaction("post", tx) @@ -344,7 +344,7 @@ func (gui *Gui) readPreviousTransactions() { it.Release() } -func (gui *Gui) processBlock(block *ethchain.Block, initial bool) { +func (gui *Gui) processBlock(block *chain.Block, initial bool) { name := strings.Trim(gui.pipe.World().Config().Get("NameReg").Storage(block.Coinbase).Str(), "\x00") b := ethpipe.NewJSBlock(block) b.Name = name @@ -407,9 +407,9 @@ func (gui *Gui) update() { events := gui.eth.EventMux().Subscribe( eth.ChainSyncEvent{}, eth.PeerListEvent{}, - ethchain.NewBlockEvent{}, - ethchain.TxPreEvent{}, - ethchain.TxPostEvent{}, + chain.NewBlockEvent{}, + chain.TxPreEvent{}, + chain.TxPostEvent{}, ethminer.Event{}, ) @@ -425,13 +425,13 @@ func (gui *Gui) update() { return } switch ev := ev.(type) { - case ethchain.NewBlockEvent: + case chain.NewBlockEvent: gui.processBlock(ev.Block, false) if bytes.Compare(ev.Block.Coinbase, gui.address()) == 0 { gui.setWalletValue(gui.eth.StateManager().CurrentState().GetAccount(gui.address()).Balance(), nil) } - case ethchain.TxPreEvent: + case chain.TxPreEvent: tx := ev.Tx object := state.GetAccount(gui.address()) @@ -444,7 +444,7 @@ func (gui *Gui) update() { gui.setWalletValue(object.Balance(), unconfirmedFunds) gui.insertTransaction("pre", tx) - case ethchain.TxPostEvent: + case chain.TxPostEvent: tx := ev.Tx object := state.GetAccount(gui.address()) |