aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/mist')
-rw-r--r--cmd/mist/assets/qml/main.qml8
-rw-r--r--cmd/mist/assets/qml/views/wallet.qml23
-rw-r--r--cmd/mist/bindings.go2
-rw-r--r--cmd/mist/debugger.go6
-rw-r--r--cmd/mist/flags.go2
-rw-r--r--cmd/mist/gui.go61
-rw-r--r--cmd/mist/main.go2
-rw-r--r--cmd/mist/ui_lib.go2
8 files changed, 48 insertions, 58 deletions
diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml
index 9f1f214a6..a08a8b4ef 100644
--- a/cmd/mist/assets/qml/main.qml
+++ b/cmd/mist/assets/qml/main.qml
@@ -786,8 +786,8 @@ ApplicationWindow {
title: "About"
minimumWidth: 350
maximumWidth: 350
- maximumHeight: 200
- minimumHeight: 200
+ maximumHeight: 280
+ minimumHeight: 280
Image {
id: aboutIcon
@@ -797,7 +797,7 @@ ApplicationWindow {
smooth: true
source: "../facet.png"
x: 10
- y: 10
+ y: 30
}
Text {
@@ -806,7 +806,7 @@ ApplicationWindow {
anchors.top: parent.top
anchors.topMargin: 30
font.pointSize: 12
- text: "<h2>Mist (0.6.5)</h2><h4>Amalthea</h4><br><h3>Development</h3>Jeffrey Wilcke<br>Viktor Trón<br><h3>Building</h3>Maran Hidskes"
+ text: "<h2>Mist (0.7.10)</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Viktor Trón<br>Felix Lange<br>Taylor Gerring<br>Daniel Nagy<br><h3>UX</h3>Alex van de Sande<br>"
}
}
diff --git a/cmd/mist/assets/qml/views/wallet.qml b/cmd/mist/assets/qml/views/wallet.qml
index 9ffb1024d..9727ef35c 100644
--- a/cmd/mist/assets/qml/views/wallet.qml
+++ b/cmd/mist/assets/qml/views/wallet.qml
@@ -148,17 +148,21 @@ Rectangle {
id: txTableView
anchors.fill : parent
TableViewColumn{ role: "num" ; title: "#" ; width: 30 }
- TableViewColumn{ role: "from" ; title: "From" ; width: 280 }
- TableViewColumn{ role: "to" ; title: "To" ; width: 280 }
+ TableViewColumn{ role: "from" ; title: "From" ; width: 340 }
+ TableViewColumn{ role: "to" ; title: "To" ; width: 340 }
TableViewColumn{ role: "value" ; title: "Amount" ; width: 100 }
model: ListModel {
id: txModel
Component.onCompleted: {
- var filter = ethx.watch({latest: -1, from: eth.key().address});
- filter.changed(addTxs)
-
- addTxs(filter.messages())
+ var me = eth.key().address;
+ var filterTo = ethx.watch({latest: -1, to: me});
+ var filterFrom = ethx.watch({latest: -1, from: me});
+ filterTo.changed(addTxs)
+ filterFrom.changed(addTxs)
+
+ addTxs(filterTo.messages())
+ addTxs(filterFrom.messages())
}
function addTxs(messages) {
@@ -167,7 +171,12 @@ Rectangle {
for(var i = 0; i < messages.length; i++) {
var message = messages.get(i);
var to = eth.lookupName(message.to);
- var from = eth.lookupName(message.from);
+ var from;
+ if(message.from.length == 0) {
+ from = "- MINED -";
+ } else {
+ from = eth.lookupName(message.from);
+ }
txModel.insert(0, {num: txModel.count, from: from, to: to, value: eth.numberToHuman(message.value)})
}
}
diff --git a/cmd/mist/bindings.go b/cmd/mist/bindings.go
index 6dbcc3f1d..6d2342c87 100644
--- a/cmd/mist/bindings.go
+++ b/cmd/mist/bindings.go
@@ -103,7 +103,7 @@ func (self *Gui) DumpState(hash, path string) {
var stateDump []byte
if len(hash) == 0 {
- stateDump = self.eth.BlockManager().CurrentState().Dump()
+ stateDump = self.eth.ChainManager().State().Dump()
} else {
var block *types.Block
if hash[0] == '#' {
diff --git a/cmd/mist/debugger.go b/cmd/mist/debugger.go
index ca3ff5af2..a7a286e23 100644
--- a/cmd/mist/debugger.go
+++ b/cmd/mist/debugger.go
@@ -141,15 +141,15 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
keyPair = self.lib.eth.KeyManager().KeyPair()
)
- statedb := self.lib.eth.BlockManager().TransState()
- account := self.lib.eth.BlockManager().TransState().GetAccount(keyPair.Address())
+ statedb := self.lib.eth.ChainManager().TransState()
+ account := self.lib.eth.ChainManager().TransState().GetAccount(keyPair.Address())
contract := statedb.NewStateObject([]byte{0})
contract.SetCode(script)
contract.SetBalance(value)
self.SetAsm(script)
- block := self.lib.eth.ChainManager().CurrentBlock
+ block := self.lib.eth.ChainManager().CurrentBlock()
env := utils.NewEnv(statedb, block, account.Address(), value)
diff --git a/cmd/mist/flags.go b/cmd/mist/flags.go
index 2ae0a0487..e49408181 100644
--- a/cmd/mist/flags.go
+++ b/cmd/mist/flags.go
@@ -104,7 +104,7 @@ func Init() {
flag.StringVar(&KeyStore, "keystore", "db", "system to store keyrings: db|file (db)")
flag.StringVar(&OutboundPort, "port", "30303", "listening port")
flag.BoolVar(&UseUPnP, "upnp", true, "enable UPnP support")
- flag.IntVar(&MaxPeer, "maxpeer", 10, "maximum desired peers")
+ flag.IntVar(&MaxPeer, "maxpeer", 30, "maximum desired peers")
flag.IntVar(&RpcPort, "rpcport", 8080, "port to start json-rpc server on")
flag.BoolVar(&StartRpc, "rpc", false, "start rpc server")
flag.BoolVar(&StartWebSockets, "ws", false, "start websocket server")
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index e58e349d1..7775889cc 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -246,7 +246,7 @@ func (gui *Gui) CreateAndSetPrivKey() (string, string, string, string) {
}
func (gui *Gui) setInitialChain(ancientBlocks bool) {
- sBlk := gui.eth.ChainManager().LastBlockHash
+ sBlk := gui.eth.ChainManager().LastBlockHash()
blk := gui.eth.ChainManager().GetBlock(sBlk)
for ; blk != nil; blk = gui.eth.ChainManager().GetBlock(sBlk) {
sBlk = blk.PrevHash
@@ -305,13 +305,13 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) {
var (
ptx = xeth.NewJSTx(tx, pipe.World().State())
- send = nameReg.Storage(tx.Sender())
- rec = nameReg.Storage(tx.Recipient)
+ send = nameReg.Storage(tx.From())
+ rec = nameReg.Storage(tx.To())
s, r string
)
- if tx.CreatesContract() {
- rec = nameReg.Storage(tx.CreationAddress(pipe.World().State()))
+ if core.MessageCreatesContract(tx) {
+ rec = nameReg.Storage(core.AddressFromMessage(tx))
}
if send.Len() != 0 {
@@ -322,10 +322,10 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) {
if rec.Len() != 0 {
r = strings.Trim(rec.Str(), "\x00")
} else {
- if tx.CreatesContract() {
- r = ethutil.Bytes2Hex(tx.CreationAddress(pipe.World().State()))
+ if core.MessageCreatesContract(tx) {
+ r = ethutil.Bytes2Hex(core.AddressFromMessage(tx))
} else {
- r = ethutil.Bytes2Hex(tx.Recipient)
+ r = ethutil.Bytes2Hex(tx.To())
}
}
ptx.Sender = s
@@ -389,7 +389,6 @@ func (gui *Gui) update() {
gui.loadAddressBook()
gui.loadMergedMiningOptions()
gui.setPeerInfo()
- //gui.readPreviousTransactions()
}()
for _, plugin := range gui.plugins {
@@ -402,9 +401,8 @@ func (gui *Gui) update() {
generalUpdateTicker := time.NewTicker(500 * time.Millisecond)
statsUpdateTicker := time.NewTicker(5 * time.Second)
- state := gui.eth.BlockManager().TransState()
+ state := gui.eth.ChainManager().TransState()
- unconfirmedFunds := new(big.Int)
gui.win.Root().Call("setWalletValue", fmt.Sprintf("%v", ethutil.CurrencyToString(state.GetAccount(gui.address()).Balance())))
lastBlockLabel := gui.getObjectByName("lastBlockLabel")
@@ -418,9 +416,6 @@ func (gui *Gui) update() {
core.TxPostEvent{},
)
- // nameReg := gui.pipe.World().Config().Get("NameReg")
- // mux.Subscribe("object:"+string(nameReg.Address()), objectChan)
-
go func() {
defer events.Unsubscribe()
for {
@@ -433,20 +428,20 @@ func (gui *Gui) update() {
case core.NewBlockEvent:
gui.processBlock(ev.Block, false)
if bytes.Compare(ev.Block.Coinbase, gui.address()) == 0 {
- gui.setWalletValue(gui.eth.BlockManager().CurrentState().GetAccount(gui.address()).Balance(), nil)
+ gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil)
}
case core.TxPreEvent:
tx := ev.Tx
- object := state.GetAccount(gui.address())
- if bytes.Compare(tx.Sender(), gui.address()) == 0 {
- unconfirmedFunds.Sub(unconfirmedFunds, tx.Value)
- } else if bytes.Compare(tx.Recipient, gui.address()) == 0 {
- unconfirmedFunds.Add(unconfirmedFunds, tx.Value)
- }
+ tstate := gui.eth.ChainManager().TransState()
+ cstate := gui.eth.ChainManager().State()
- gui.setWalletValue(object.Balance(), unconfirmedFunds)
+ taccount := tstate.GetAccount(gui.address())
+ caccount := cstate.GetAccount(gui.address())
+ unconfirmedFunds := new(big.Int).Sub(taccount.Balance(), caccount.Balance())
+
+ gui.setWalletValue(taccount.Balance(), unconfirmedFunds)
gui.insertTransaction("pre", tx)
case core.TxPostEvent:
@@ -454,40 +449,26 @@ func (gui *Gui) update() {
object := state.GetAccount(gui.address())
if bytes.Compare(tx.Sender(), gui.address()) == 0 {
- object.SubAmount(tx.Value)
+ object.SubAmount(tx.Value())
- //gui.getObjectByName("transactionView").Call("addTx", xeth.NewJSTx(tx), "send")
gui.txDb.Put(tx.Hash(), tx.RlpEncode())
- } else if bytes.Compare(tx.Recipient, gui.address()) == 0 {
- object.AddAmount(tx.Value)
+ } else if bytes.Compare(tx.To(), gui.address()) == 0 {
+ object.AddAmount(tx.Value())
- //gui.getObjectByName("transactionView").Call("addTx", xeth.NewJSTx(tx), "recv")
gui.txDb.Put(tx.Hash(), tx.RlpEncode())
}
gui.setWalletValue(object.Balance(), nil)
state.UpdateStateObject(object)
- // case object:
- // gui.loadAddressBook()
-
case eth.PeerListEvent:
gui.setPeerInfo()
-
- /*
- case miner.Event:
- if ev.Type == miner.Started {
- gui.miner = ev.Miner
- } else {
- gui.miner = nil
- }
- */
}
case <-peerUpdateTicker.C:
gui.setPeerInfo()
case <-generalUpdateTicker.C:
- statusText := "#" + gui.eth.ChainManager().CurrentBlock.Number.String()
+ statusText := "#" + gui.eth.ChainManager().CurrentBlock().Number.String()
lastBlockLabel.Set("text", statusText)
miningLabel.Set("text", "Mining @ "+strconv.FormatInt(gui.uiLib.miner.GetPow().GetHashrate(), 10)+"Khash")
diff --git a/cmd/mist/main.go b/cmd/mist/main.go
index 8c46de6d9..eaf0af0c7 100644
--- a/cmd/mist/main.go
+++ b/cmd/mist/main.go
@@ -31,7 +31,7 @@ import (
const (
ClientIdentifier = "Mist"
- Version = "0.7.7"
+ Version = "0.7.10"
)
var ethereum *eth.Ethereum
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go
index 2b5e56646..fdbde50fd 100644
--- a/cmd/mist/ui_lib.go
+++ b/cmd/mist/ui_lib.go
@@ -200,7 +200,7 @@ func (ui *UiLib) AssetPath(p string) string {
func (self *UiLib) StartDbWithContractAndData(contractHash, data string) {
dbWindow := NewDebuggerWindow(self)
- object := self.eth.BlockManager().CurrentState().GetStateObject(ethutil.Hex2Bytes(contractHash))
+ object := self.eth.ChainManager().State().GetStateObject(ethutil.Hex2Bytes(contractHash))
if len(object.Code) > 0 {
dbWindow.SetCode("0x" + ethutil.Bytes2Hex(object.Code))
}