Skip to content

Commit bd95fd7

Browse files
committed
Merge branch 'release/0.6.7'
2 parents b8b1453 + 2b8eae9 commit bd95fd7

File tree

11 files changed

+65
-58
lines changed

11 files changed

+65
-58
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Status](http://cpt-obvious.ethercasts.com:8010/buildstatusimage?builder=go-ether
77

88
Ethereum Go Client © 2014 Jeffrey Wilcke.
99

10-
Current state: Proof of Concept 0.6.6.
10+
Current state: Proof of Concept 0.6.7.
1111

1212
For the development package please see the [eth-go package](https://github.com/ethereum/eth-go).
1313

ethereum/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
const (
1515
ClientIdentifier = "Ethereum(G)"
16-
Version = "0.6.6"
16+
Version = "0.6.7"
1717
)
1818

1919
var logger = ethlog.NewLogger("CLI")

mist/assets/debugger/debugger.qml

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ ApplicationWindow {
357357
anchors.right: parent.right
358358
model: ListModel {
359359
ListElement { text: "Snippets" ; value: "" }
360-
ListElement { text: "Call Contract" ; value: "var[2] in;\nvar ret;\n\nin[0] = \"arg1\"\nin[1] = 0xdeadbeef\n\nvar success = call(0x0c542ddea93dae0c2fcb2cf175f03ad80d6be9a0, 0, 7000, in, ret)\n\nreturn ret" }
360+
ListElement { text: "Call Contract" ; value: "var[2] in = { \"arg1\", 0xdeadbeef };\nvar ret;\n\nvar success = call(0x0c542ddea93dae0c2fcb2cf175f03ad80d6be9a0, 0, 7000, in, ret)\n\nreturn ret" }
361361
}
362362
onCurrentIndexChanged: {
363363
if(currentIndex != 0) {

mist/assets/ext/html_messaging.js

+14-13
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,19 @@
9292
promises.push(params.from.then(function(_from) { params.from = _from; }));
9393
}
9494

95-
if(isPromise(params.data)) {
96-
promises.push(params.data.then(function(_code) { params.data = _code; }));
97-
} else {
98-
if(typeof params.data === "object") {
99-
data = "";
100-
for(var i = 0; i < params.data.length; i++) {
101-
data += params.data[i]
102-
}
103-
} else {
104-
data = params.data;
105-
}
106-
}
107-
95+
if(typeof params.data !== "object" || isPromise(params.data)) {
96+
params.data = [params.data]
97+
}
98+
99+
var data = params.data;
100+
for(var i = 0; i < params.data.length; i++) {
101+
if(isPromise(params.data[i])) {
102+
var promise = params.data[i];
103+
var _i = i;
104+
promises.push(promise.then(function(_arg) { params.data[_i] = _arg; }));
105+
}
106+
}
107+
108108
// Make sure everything is string
109109
var fields = ["value", "gas", "gasPrice"];
110110
for(var i = 0; i < fields.length; i++) {
@@ -117,6 +117,7 @@
117117
// Load promises then call the last "transact".
118118
return Q.all(promises).then(function() {
119119
return new Promise(function(resolve, reject) {
120+
params.data = params.data.join("");
120121
postData({call: "transact", args: params}, function(data) {
121122
if(data[1])
122123
reject(data[0]);

mist/assets/qml/wallet.qml mist/assets/qml/main.qml

+3-2
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ ApplicationWindow {
739739

740740
function addPeer(peer) {
741741
// We could just append the whole peer object but it cries if you try to alter them
742-
peerModel.append({ip: peer.ip, port: peer.port, lastResponse:timeAgo(peer.lastSend), latency: peer.latency, version: peer.version})
742+
peerModel.append({ip: peer.ip, port: peer.port, lastResponse:timeAgo(peer.lastSend), latency: peer.latency, version: peer.version, caps: peer.caps})
743743
}
744744

745745
function resetPeers(){
@@ -782,10 +782,11 @@ ApplicationWindow {
782782
id: peerTable
783783
model: peerModel
784784
TableViewColumn{width: 100; role: "ip" ; title: "IP" }
785-
TableViewColumn{width: 60; role: "port" ; title: "Port" }
785+
TableViewColumn{width: 60; role: "port" ; title: "Port" }
786786
TableViewColumn{width: 140; role: "lastResponse"; title: "Last event" }
787787
TableViewColumn{width: 100; role: "latency"; title: "Latency" }
788788
TableViewColumn{width: 260; role: "version" ; title: "Version" }
789+
TableViewColumn{width: 80; role: "caps" ; title: "Capabilities" }
789790
}
790791
}
791792
}

mist/assets/qml/views/info.qml

+6-35
Original file line numberDiff line numberDiff line change
@@ -121,40 +121,7 @@ Rectangle {
121121
}
122122
}
123123

124-
Slider {
125-
id: logLevelSlider
126-
value: gui.getLogLevelInt()
127-
anchors {
128-
right: parent.right
129-
top: parent.top
130-
bottom: parent.bottom
131-
132-
rightMargin: 5
133-
leftMargin: 5
134-
topMargin: 5
135-
bottomMargin: 5
136-
}
137-
138-
orientation: Qt.Vertical
139-
maximumValue: 5
140-
stepSize: 1
141-
142-
onValueChanged: {
143-
gui.setLogLevel(value)
144-
}
145-
}
146-
}
147-
148-
property var logModel: ListModel {
149-
id: logModel
150-
}
151-
152-
/*
153-
RowLayout {
154-
id: logLayout
155-
width: parent.width
156-
height: 200
157-
anchors.bottom: parent.bottom
124+
/*
158125
TableView {
159126
id: logView
160127
headerVisible: false
@@ -169,6 +136,7 @@ Rectangle {
169136
170137
model: logModel
171138
}
139+
*/
172140

173141
Slider {
174142
id: logLevelSlider
@@ -193,7 +161,10 @@ Rectangle {
193161
}
194162
}
195163
}
196-
*/
164+
165+
property var logModel: ListModel {
166+
id: logModel
167+
}
197168

198169
function addDebugMessage(message){
199170
debuggerLog.append({value: message})

mist/assets/qml/views/jeffcoin/jeffcoin.qml

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Rectangle {
2222

2323
var me = eth.key().address;
2424
if((to == me|| from == me) && message.input.length == 128) {
25+
var to = eth.lookupName(to)
26+
var from = eth.lookupName(from)
2527
txModel.insert(0, {confirmations: blockNumber - message.number, from: from, to: to, value: value})
2628
}
2729
}
@@ -151,7 +153,11 @@ Rectangle {
151153
Button {
152154
text: "Send"
153155
onClicked: {
154-
eth.transact({from: eth.key().privateKey, to:address, gas: "9000", gasPrice: "10000000000000", data: ["0x"+txTo.text, txValue.text]})
156+
var lookup = eth.lookupAddress(address)
157+
if(lookup.length == 0)
158+
lookup = address
159+
160+
eth.transact({from: eth.key().privateKey, to:lookup, gas: "9000", gasPrice: "10000000000000", data: ["0x"+txTo.text, txValue.text]})
155161
}
156162
}
157163
}

mist/assets/qml/views/wallet.qml

+3-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ Rectangle {
160160
function addTxs(messages) {
161161
for(var i = 0; i < messages.length; i++) {
162162
var message = messages.get(i);
163-
txModel.insert(0, {num: txModel.count, from: message.from, to: message.to, value: eth.numberToHuman(message.value)})
163+
var to = eth.lookupName(message.to);
164+
var from = eth.lookupName(message.from);
165+
txModel.insert(0, {num: txModel.count, from: from, to: to, value: eth.numberToHuman(message.value)})
164166
}
165167
}
166168
}

mist/gui.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (gui *Gui) Stop() {
172172
}
173173

174174
func (gui *Gui) showWallet(context *qml.Context) (*qml.Window, error) {
175-
component, err := gui.engine.LoadFile(gui.uiLib.AssetPath("qml/wallet.qml"))
175+
component, err := gui.engine.LoadFile(gui.uiLib.AssetPath("qml/main.qml"))
176176
if err != nil {
177177
return nil, err
178178
}
@@ -500,7 +500,7 @@ func (gui *Gui) setStatsPane() {
500500
runtime.ReadMemStats(&memStats)
501501

502502
statsPane := gui.getObjectByName("statsPane")
503-
statsPane.Set("text", fmt.Sprintf(`###### Mist 0.6.5 (%s) #######
503+
statsPane.Set("text", fmt.Sprintf(`###### Mist 0.6.7 (%s) #######
504504
505505
eth %d (p2p = %d)
506506

mist/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
const (
1414
ClientIdentifier = "Mist"
15-
Version = "0.6.6"
15+
Version = "0.6.7"
1616
)
1717

1818
var ethereum *eth.Ethereum

mist/ui_lib.go

+26
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,32 @@ func (self *UiLib) LookupDomain(domain string) string {
7171
}
7272
}
7373

74+
func (self *UiLib) LookupName(addr string) string {
75+
var (
76+
nameReg = self.World().Config().Get("NameReg")
77+
lookup = nameReg.Storage(ethutil.Hex2Bytes(addr))
78+
)
79+
80+
if lookup.Len() != 0 {
81+
return strings.Trim(lookup.Str(), "\x00")
82+
}
83+
84+
return addr
85+
}
86+
87+
func (self *UiLib) LookupAddress(name string) string {
88+
var (
89+
nameReg = self.World().Config().Get("NameReg")
90+
lookup = nameReg.Storage(ethutil.RightPadBytes([]byte(name), 32))
91+
)
92+
93+
if lookup.Len() != 0 {
94+
return ethutil.Bytes2Hex(lookup.Bytes())
95+
}
96+
97+
return ""
98+
}
99+
74100
func (self *UiLib) PastPeers() *ethutil.List {
75101
return ethutil.NewList(eth.PastPeers())
76102
}

0 commit comments

Comments
 (0)