Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
b8b1453392 | |||
1cb12296f6 | |||
96fd1ce270 | |||
6ecbbe4006 | |||
acfb5b85fb | |||
70db149494 | |||
a4007f3b68 | |||
353b558536 | |||
8516e748ca | |||
8780deece9 | |||
9ac4e23b66 |
@ -7,7 +7,7 @@ Status](http://cpt-obvious.ethercasts.com:8010/buildstatusimage?builder=go-ether
|
|||||||
|
|
||||||
Ethereum Go Client © 2014 Jeffrey Wilcke.
|
Ethereum Go Client © 2014 Jeffrey Wilcke.
|
||||||
|
|
||||||
Current state: Proof of Concept 0.6.5.
|
Current state: Proof of Concept 0.6.6.
|
||||||
|
|
||||||
For the development package please see the [eth-go package](https://github.com/ethereum/eth-go).
|
For the development package please see the [eth-go package](https://github.com/ethereum/eth-go).
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
ClientIdentifier = "Ethereum(G)"
|
ClientIdentifier = "Ethereum(G)"
|
||||||
Version = "0.6.5"
|
Version = "0.6.6"
|
||||||
)
|
)
|
||||||
|
|
||||||
var logger = ethlog.NewLogger("CLI")
|
var logger = ethlog.NewLogger("CLI")
|
||||||
|
@ -335,7 +335,7 @@
|
|||||||
|
|
||||||
Object.defineProperty(eth, "gasPrice", {
|
Object.defineProperty(eth, "gasPrice", {
|
||||||
get: function() {
|
get: function() {
|
||||||
return "1000000000000"
|
return "10000000000000"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -47,9 +47,9 @@ Rectangle {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var blockNumber = eth.block(-1).number;
|
var blockNumber = eth.block(-1).number;
|
||||||
var messages = filter.messages()
|
var msgs = filter.messages()
|
||||||
for(var i = messages.length-1; i >= 0; i--) {
|
for(var i = msgs.length-1; i >= 0; i--) {
|
||||||
var message = messages.get(i)
|
var message = JSON.parse(msgs.getAsJson(i))
|
||||||
|
|
||||||
insertTx(message, blockNumber)
|
insertTx(message, blockNumber)
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ Rectangle {
|
|||||||
Button {
|
Button {
|
||||||
text: "Send"
|
text: "Send"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
eth.transact({from: eth.key().privateKey, to:address, gas: "9000", gasPrice: "100000000000", data: ["0x"+txTo.text, txValue.text]})
|
eth.transact({from: eth.key().privateKey, to:address, gas: "9000", gasPrice: "10000000000000", data: ["0x"+txTo.text, txValue.text]})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ ApplicationWindow {
|
|||||||
|
|
||||||
property alias miningButtonText: miningButton.text
|
property alias miningButtonText: miningButton.text
|
||||||
property var ethx : Eth.ethx
|
property var ethx : Eth.ethx
|
||||||
property var web
|
property var browser
|
||||||
|
|
||||||
width: 1200
|
width: 1200
|
||||||
height: 820
|
height: 820
|
||||||
@ -29,7 +29,7 @@ ApplicationWindow {
|
|||||||
//var messages = JSON.parse(data)
|
//var messages = JSON.parse(data)
|
||||||
// Signal handler
|
// Signal handler
|
||||||
messages(data, receiverSeed);
|
messages(data, receiverSeed);
|
||||||
root.web.messages(data, receiverSeed);
|
root.browser.view.messages(data, receiverSeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
@ -47,7 +47,7 @@ ApplicationWindow {
|
|||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var wallet = addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "ethereum", active: true});
|
var wallet = addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "ethereum", active: true});
|
||||||
var browser = addPlugin("./webapp.qml", {noAdd: true, close: false, section: "ethereum", active: true});
|
var browser = addPlugin("./webapp.qml", {noAdd: true, close: false, section: "ethereum", active: true});
|
||||||
root.web = browser.view;
|
root.browser = browser;
|
||||||
|
|
||||||
addPlugin("./views/transaction.qml", {noAdd: true, close: false, section: "legacy"});
|
addPlugin("./views/transaction.qml", {noAdd: true, close: false, section: "legacy"});
|
||||||
addPlugin("./views/chain.qml", {noAdd: true, close: false, section: "legacy"});
|
addPlugin("./views/chain.qml", {noAdd: true, close: false, section: "legacy"});
|
||||||
@ -254,6 +254,7 @@ ApplicationWindow {
|
|||||||
|
|
||||||
statusBar: StatusBar {
|
statusBar: StatusBar {
|
||||||
height: 32
|
height: 32
|
||||||
|
id: statusBar
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Button {
|
Button {
|
||||||
id: miningButton
|
id: miningButton
|
||||||
@ -294,16 +295,16 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProgressBar {
|
ProgressBar {
|
||||||
id: syncProgressIndicator
|
id: downloadIndicator
|
||||||
visible: false
|
value: 0
|
||||||
objectName: "syncProgressIndicator"
|
visible: true
|
||||||
|
objectName: "downloadIndicator"
|
||||||
y: 3
|
y: 3
|
||||||
width: 140
|
x: statusBar.width / 2 - this.width / 2
|
||||||
indeterminate: true
|
width: 160
|
||||||
anchors.right: peerGroup.left
|
|
||||||
anchors.rightMargin: 5
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: peerGroup
|
id: peerGroup
|
||||||
y: 7
|
y: 7
|
||||||
@ -648,11 +649,14 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
if(this.text == "uuddlrlrba") { gui.toggleTurboMining(); }
|
if(/^https?/.test(this.text)) {
|
||||||
|
root.browser.view.open(this.text);
|
||||||
|
mainSplit.setView(root.browser.view, root.browser.menuItem);
|
||||||
|
} else {
|
||||||
addPlugin(this.text, {close: true, section: "apps"})
|
addPlugin(this.text, {close: true, section: "apps"})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,48 @@ import "../ext/qml_messaging.js" as Messaging
|
|||||||
property alias url: webview.url
|
property alias url: webview.url
|
||||||
property alias webView: webview
|
property alias webView: webview
|
||||||
|
|
||||||
|
property var cleanPath: false
|
||||||
|
property var open: function(url) {
|
||||||
|
if(!window.cleanPath) {
|
||||||
|
var uri = url;
|
||||||
|
if(!/.*\:\/\/.*/.test(uri)) {
|
||||||
|
uri = "http://" + uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
var reg = /(^https?\:\/\/(?:www\.)?)([a-zA-Z0-9_\-]*\.eth)(.*)/
|
||||||
|
|
||||||
|
if(reg.test(uri)) {
|
||||||
|
uri.replace(reg, function(match, pre, domain, path) {
|
||||||
|
uri = pre;
|
||||||
|
|
||||||
|
var lookup = eth.lookupDomain(domain.substring(0, domain.length - 4));
|
||||||
|
var ip = [];
|
||||||
|
for(var i = 0, l = lookup.length; i < l; i++) {
|
||||||
|
ip.push(lookup.charCodeAt(i))
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ip.length != 0) {
|
||||||
|
uri += lookup;
|
||||||
|
} else {
|
||||||
|
uri += domain;
|
||||||
|
}
|
||||||
|
|
||||||
|
uri += path;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
window.cleanPath = true;
|
||||||
|
|
||||||
|
webview.url = uri;
|
||||||
|
|
||||||
|
//uriNav.text = uri.text.replace(/(^https?\:\/\/(?:www\.)?)([a-zA-Z0-9_\-]*\.\w{2,3})(.*)/, "$1$2<span style='color:#CCC'>$3</span>");
|
||||||
|
uriNav.text = uri;
|
||||||
|
} else {
|
||||||
|
// Prevent inf loop.
|
||||||
|
window.cleanPath = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
webview.url = "http://etherian.io"
|
webview.url = "http://etherian.io"
|
||||||
}
|
}
|
||||||
@ -103,43 +145,9 @@ import "../ext/qml_messaging.js" as Messaging
|
|||||||
top: navBar.bottom
|
top: navBar.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
property var cleanPath: false
|
//property var cleanPath: false
|
||||||
onNavigationRequested: {
|
onNavigationRequested: {
|
||||||
if(!this.cleanPath) {
|
window.open(request.url.toString());
|
||||||
var uri = request.url.toString();
|
|
||||||
if(!/.*\:\/\/.*/.test(uri)) {
|
|
||||||
uri = "http://" + uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
var reg = /(^https?\:\/\/(?:www\.)?)([a-zA-Z0-9_\-]*\.eth)(.*)/
|
|
||||||
|
|
||||||
if(reg.test(uri)) {
|
|
||||||
uri.replace(reg, function(match, pre, domain, path) {
|
|
||||||
uri = pre;
|
|
||||||
|
|
||||||
var lookup = eth.lookupDomain(domain.substring(0, domain.length - 4));
|
|
||||||
var ip = [];
|
|
||||||
for(var i = 0, l = lookup.length; i < l; i++) {
|
|
||||||
ip.push(lookup.charCodeAt(i))
|
|
||||||
}
|
|
||||||
|
|
||||||
if(ip.length != 0) {
|
|
||||||
uri += lookup;
|
|
||||||
} else {
|
|
||||||
uri += domain;
|
|
||||||
}
|
|
||||||
|
|
||||||
uri += path;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.cleanPath = true;
|
|
||||||
|
|
||||||
webview.url = uri;
|
|
||||||
} else {
|
|
||||||
// Prevent inf loop.
|
|
||||||
this.cleanPath = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendMessage(data) {
|
function sendMessage(data) {
|
||||||
|
21
mist/gui.go
21
mist/gui.go
@ -385,14 +385,13 @@ func (gui *Gui) update() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
peerUpdateTicker := time.NewTicker(5 * time.Second)
|
peerUpdateTicker := time.NewTicker(5 * time.Second)
|
||||||
generalUpdateTicker := time.NewTicker(1 * time.Second)
|
generalUpdateTicker := time.NewTicker(500 * time.Millisecond)
|
||||||
statsUpdateTicker := time.NewTicker(5 * time.Second)
|
statsUpdateTicker := time.NewTicker(5 * time.Second)
|
||||||
|
|
||||||
state := gui.eth.StateManager().TransState()
|
state := gui.eth.StateManager().TransState()
|
||||||
|
|
||||||
unconfirmedFunds := new(big.Int)
|
unconfirmedFunds := new(big.Int)
|
||||||
gui.win.Root().Call("setWalletValue", fmt.Sprintf("%v", ethutil.CurrencyToString(state.GetAccount(gui.address()).Balance)))
|
gui.win.Root().Call("setWalletValue", fmt.Sprintf("%v", ethutil.CurrencyToString(state.GetAccount(gui.address()).Balance)))
|
||||||
gui.getObjectByName("syncProgressIndicator").Set("visible", !gui.eth.IsUpToDate())
|
|
||||||
|
|
||||||
lastBlockLabel := gui.getObjectByName("lastBlockLabel")
|
lastBlockLabel := gui.getObjectByName("lastBlockLabel")
|
||||||
miningLabel := gui.getObjectByName("miningLabel")
|
miningLabel := gui.getObjectByName("miningLabel")
|
||||||
@ -439,9 +438,6 @@ func (gui *Gui) update() {
|
|||||||
|
|
||||||
state.UpdateStateObject(object)
|
state.UpdateStateObject(object)
|
||||||
}
|
}
|
||||||
case msg := <-chainSyncChan:
|
|
||||||
sync := msg.Resource.(bool)
|
|
||||||
gui.win.Root().ObjectByName("syncProgressIndicator").Set("visible", sync)
|
|
||||||
|
|
||||||
case <-objectChan:
|
case <-objectChan:
|
||||||
gui.loadAddressBook()
|
gui.loadAddressBook()
|
||||||
@ -464,9 +460,22 @@ func (gui *Gui) update() {
|
|||||||
miningLabel.Set("text", "Mining @ "+strconv.FormatInt(pow.GetHashrate(), 10)+"Khash")
|
miningLabel.Set("text", "Mining @ "+strconv.FormatInt(pow.GetHashrate(), 10)+"Khash")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blockLength := gui.eth.BlockPool().BlocksProcessed
|
||||||
|
chainLength := gui.eth.BlockPool().ChainLength
|
||||||
|
|
||||||
|
var (
|
||||||
|
pct float64 = 1.0 / float64(chainLength) * float64(blockLength)
|
||||||
|
dlWidget = gui.win.Root().ObjectByName("downloadIndicator")
|
||||||
|
)
|
||||||
|
if pct < 1.0 {
|
||||||
|
dlWidget.Set("visible", true)
|
||||||
|
dlWidget.Set("value", pct)
|
||||||
|
} else {
|
||||||
|
dlWidget.Set("visible", false)
|
||||||
|
}
|
||||||
|
|
||||||
case <-statsUpdateTicker.C:
|
case <-statsUpdateTicker.C:
|
||||||
gui.setStatsPane()
|
gui.setStatsPane()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
ClientIdentifier = "Mist"
|
ClientIdentifier = "Mist"
|
||||||
Version = "0.6.5"
|
Version = "0.6.6"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ethereum *eth.Ethereum
|
var ethereum *eth.Ethereum
|
||||||
|
@ -188,9 +188,9 @@ func (self *UiLib) NewFilterString(typ string) int {
|
|||||||
func (self *UiLib) Messages(id int) *ethutil.List {
|
func (self *UiLib) Messages(id int) *ethutil.List {
|
||||||
filter := self.eth.GetFilter(id)
|
filter := self.eth.GetFilter(id)
|
||||||
if filter != nil {
|
if filter != nil {
|
||||||
messages := filter.Find()
|
messages := ethpipe.ToJSMessages(filter.Find())
|
||||||
|
|
||||||
return ethpipe.ToJSMessages(messages)
|
return messages
|
||||||
}
|
}
|
||||||
|
|
||||||
return ethutil.EmptyList()
|
return ethutil.EmptyList()
|
||||||
@ -240,7 +240,6 @@ func mapToTxParams(object map[string]interface{}) map[string]string {
|
|||||||
dataStr += str
|
dataStr += str
|
||||||
}
|
}
|
||||||
object["data"] = dataStr
|
object["data"] = dataStr
|
||||||
fmt.Println(object)
|
|
||||||
|
|
||||||
conv := make(map[string]string)
|
conv := make(map[string]string)
|
||||||
for key, value := range object {
|
for key, value := range object {
|
||||||
|
Reference in New Issue
Block a user