aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ethereum/main.go7
-rw-r--r--cmd/ethereum/repl/repl_windows.go14
-rw-r--r--cmd/mist/bindings.go5
-rw-r--r--cmd/mist/ext_app.go3
-rw-r--r--cmd/mist/gui.go7
-rw-r--r--cmd/mist/html_container.go5
-rw-r--r--cmd/mist/qml_container.go5
-rw-r--r--cmd/mist/ui_lib.go5
-rw-r--r--cmd/utils/vm_env.go7
9 files changed, 29 insertions, 29 deletions
diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go
index 1493de384..c351167f2 100644
--- a/cmd/ethereum/main.go
+++ b/cmd/ethereum/main.go
@@ -22,7 +22,7 @@ import (
"os"
"runtime"
- "github.com/ethereum/go-ethereum/chain"
+ "github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger"
@@ -74,7 +74,7 @@ func main() {
ethereum := utils.NewEthereum(db, clientIdentity, keyManager, UseUPnP, OutboundPort, MaxPeer)
if Dump {
- var block *chain.Block
+ var block *types.Block
if len(DumpHash) == 0 && DumpNumber == -1 {
block = ethereum.ChainManager().CurrentBlock
@@ -93,7 +93,8 @@ func main() {
os.Exit(1)
}
- fmt.Printf("RLP: %x\nstate: %x\nhash: %x\n", ethutil.Rlp(block), block.Root(), block.Hash())
+ // block.GetRoot() does not exist
+ //fmt.Printf("RLP: %x\nstate: %x\nhash: %x\n", ethutil.Rlp(block), block.GetRoot(), block.Hash())
// Leave the Println. This needs clean output for piping
fmt.Printf("%s\n", block.State().Dump())
diff --git a/cmd/ethereum/repl/repl_windows.go b/cmd/ethereum/repl/repl_windows.go
index 9b1eb3b7d..d2c405ee9 100644
--- a/cmd/ethereum/repl/repl_windows.go
+++ b/cmd/ethereum/repl/repl_windows.go
@@ -32,7 +32,7 @@ func (self *JSRepl) read() {
if err != nil {
fmt.Println("Error reading input", err)
} else {
- if (string(str) == "exit") {
+ if string(str) == "exit" {
self.Stop()
break
} else {
@@ -46,25 +46,25 @@ func addHistory(s string) {
}
func printColored(outputVal string) {
- for ; outputVal != "" ; {
+ for outputVal != "" {
codePart := ""
- if (strings.HasPrefix(outputVal, "\033[32m")) {
+ if strings.HasPrefix(outputVal, "\033[32m") {
codePart = "\033[32m"
changeColor(2)
}
- if (strings.HasPrefix(outputVal, "\033[1m\033[30m")) {
+ if strings.HasPrefix(outputVal, "\033[1m\033[30m") {
codePart = "\033[1m\033[30m"
changeColor(8)
}
- if (strings.HasPrefix(outputVal, "\033[31m")) {
+ if strings.HasPrefix(outputVal, "\033[31m") {
codePart = "\033[31m"
changeColor(red)
}
- if (strings.HasPrefix(outputVal, "\033[35m")) {
+ if strings.HasPrefix(outputVal, "\033[35m") {
codePart = "\033[35m"
changeColor(5)
}
- if (strings.HasPrefix(outputVal, "\033[0m")) {
+ if strings.HasPrefix(outputVal, "\033[0m") {
codePart = "\033[0m"
resetColorful()
}
diff --git a/cmd/mist/bindings.go b/cmd/mist/bindings.go
index 480c38b2e..eb78c3acc 100644
--- a/cmd/mist/bindings.go
+++ b/cmd/mist/bindings.go
@@ -21,8 +21,7 @@ import (
"encoding/json"
"os"
"strconv"
-
- "github.com/ethereum/go-ethereum/chain"
+ "github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger"
@@ -106,7 +105,7 @@ func (self *Gui) DumpState(hash, path string) {
if len(hash) == 0 {
stateDump = self.eth.BlockManager().CurrentState().Dump()
} else {
- var block *chain.Block
+ var block *types.Block
if hash[0] == '#' {
i, _ := strconv.Atoi(hash[1:])
block = self.eth.ChainManager().GetBlockByNumber(uint64(i))
diff --git a/cmd/mist/ext_app.go b/cmd/mist/ext_app.go
index d004f98c5..22fa4bfaf 100644
--- a/cmd/mist/ext_app.go
+++ b/cmd/mist/ext_app.go
@@ -21,6 +21,7 @@ import (
"encoding/json"
"github.com/ethereum/go-ethereum/chain"
+ "github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/javascript"
"github.com/ethereum/go-ethereum/state"
@@ -36,7 +37,7 @@ type AppContainer interface {
Window() *qml.Window
Engine() *qml.Engine
- NewBlock(*chain.Block)
+ NewBlock(*types.Block)
NewWatcher(chan bool)
Messages(state.Messages, string)
Post(string, int)
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index 62943fa9e..61b66cce3 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -32,6 +32,7 @@ import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/chain"
+ "github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger"
@@ -290,7 +291,7 @@ func (self *Gui) loadMergedMiningOptions() {
}
}
-func (gui *Gui) insertTransaction(window string, tx *chain.Transaction) {
+func (gui *Gui) insertTransaction(window string, tx *types.Transaction) {
pipe := xeth.New(gui.eth)
nameReg := pipe.World().Config().Get("NameReg")
addr := gui.address()
@@ -340,7 +341,7 @@ func (gui *Gui) insertTransaction(window string, tx *chain.Transaction) {
func (gui *Gui) readPreviousTransactions() {
it := gui.txDb.NewIterator()
for it.Next() {
- tx := chain.NewTransactionFromBytes(it.Value())
+ tx := types.NewTransactionFromBytes(it.Value())
gui.insertTransaction("post", tx)
@@ -348,7 +349,7 @@ func (gui *Gui) readPreviousTransactions() {
it.Release()
}
-func (gui *Gui) processBlock(block *chain.Block, initial bool) {
+func (gui *Gui) processBlock(block *types.Block, initial bool) {
name := strings.Trim(gui.pipe.World().Config().Get("NameReg").Storage(block.Coinbase).Str(), "\x00")
b := xeth.NewJSBlock(block)
b.Name = name
diff --git a/cmd/mist/html_container.go b/cmd/mist/html_container.go
index 35e351b02..4c6609a95 100644
--- a/cmd/mist/html_container.go
+++ b/cmd/mist/html_container.go
@@ -26,8 +26,7 @@ import (
"os"
"path"
"path/filepath"
-
- "github.com/ethereum/go-ethereum/chain"
+ "github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/javascript"
"github.com/ethereum/go-ethereum/state"
@@ -138,7 +137,7 @@ func (app *HtmlApplication) Window() *qml.Window {
return app.win
}
-func (app *HtmlApplication) NewBlock(block *chain.Block) {
+func (app *HtmlApplication) NewBlock(block *types.Block) {
b := &xeth.JSBlock{Number: int(block.BlockInfo().Number), Hash: ethutil.Bytes2Hex(block.Hash())}
app.webView.Call("onNewBlockCb", b)
}
diff --git a/cmd/mist/qml_container.go b/cmd/mist/qml_container.go
index 60013ec2b..b5986c16e 100644
--- a/cmd/mist/qml_container.go
+++ b/cmd/mist/qml_container.go
@@ -20,8 +20,7 @@ package main
import (
"fmt"
"runtime"
-
- "github.com/ethereum/go-ethereum/chain"
+ "github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/xeth"
@@ -65,7 +64,7 @@ func (app *QmlApplication) NewWatcher(quitChan chan bool) {
}
// Events
-func (app *QmlApplication) NewBlock(block *chain.Block) {
+func (app *QmlApplication) NewBlock(block *types.Block) {
pblock := &xeth.JSBlock{Number: int(block.BlockInfo().Number), Hash: ethutil.Bytes2Hex(block.Hash())}
app.win.Call("onNewBlockCb", pblock)
}
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go
index 4e480144f..01352f192 100644
--- a/cmd/mist/ui_lib.go
+++ b/cmd/mist/ui_lib.go
@@ -26,6 +26,7 @@ import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/chain"
+ "github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/javascript"
@@ -126,7 +127,7 @@ func (self *UiLib) PastPeers() *ethutil.List {
}
func (self *UiLib) ImportTx(rlpTx string) {
- tx := chain.NewTransactionFromBytes(ethutil.Hex2Bytes(rlpTx))
+ tx := types.NewTransactionFromBytes(ethutil.Hex2Bytes(rlpTx))
self.eth.TxPool().QueueTransaction(tx)
}
@@ -228,7 +229,7 @@ func (self *UiLib) NewFilter(object map[string]interface{}) (id int) {
func (self *UiLib) NewFilterString(typ string) (id int) {
filter := chain.NewFilter(self.eth)
- filter.BlockCallback = func(block *chain.Block) {
+ filter.BlockCallback = func(block *types.Block) {
if self.win != nil && self.win.Root() != nil {
self.win.Root().Call("invokeFilterCallback", "{}", id)
} else {
diff --git a/cmd/utils/vm_env.go b/cmd/utils/vm_env.go
index e201627e2..b2788efa1 100644
--- a/cmd/utils/vm_env.go
+++ b/cmd/utils/vm_env.go
@@ -2,21 +2,20 @@ package utils
import (
"math/big"
-
- "github.com/ethereum/go-ethereum/chain"
+ "github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/vm"
)
type VMEnv struct {
state *state.State
- block *chain.Block
+ block *types.Block
transactor []byte
value *big.Int
}
-func NewEnv(state *state.State, block *chain.Block, transactor []byte, value *big.Int) *VMEnv {
+func NewEnv(state *state.State, block *types.Block, transactor []byte, value *big.Int) *VMEnv {
return &VMEnv{
state: state,
block: block,