Merge branch 'develop' of github.com:ethereum/go-ethereum into develop
This commit is contained in:
commit
a32a15ad93
@ -5,7 +5,7 @@ Ethereum
|
||||
|
||||
Ethereum Go Client © 2014 Jeffrey Wilcke.
|
||||
|
||||
Current state: Proof of Concept 5.0 RC12.
|
||||
Current state: Proof of Concept 5.0 RC13.
|
||||
|
||||
For the development package please see the [eth-go package](https://github.com/ethereum/eth-go).
|
||||
|
||||
|
@ -135,7 +135,7 @@ ApplicationWindow {
|
||||
}
|
||||
height: parent.height
|
||||
width: 300
|
||||
TableViewColumn{ role: "value" ; title: "Stack" ; width: 200 }
|
||||
TableViewColumn{ role: "value" ; title: "Temp" ; width: 200 }
|
||||
model: stackModel
|
||||
}
|
||||
|
||||
@ -224,8 +224,8 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
function setInstruction(num) {
|
||||
//asmTableView.selection.clear()
|
||||
//asmTableView.selection.select(num)
|
||||
asmTableView.selection.clear()
|
||||
asmTableView.selection.select(num)
|
||||
}
|
||||
|
||||
function setMem(mem) {
|
||||
|
@ -29,6 +29,7 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
Menu {
|
||||
title: "Developer"
|
||||
MenuItem {
|
||||
text: "Debugger"
|
||||
shortcut: "Ctrl+d"
|
||||
@ -261,7 +262,7 @@ ApplicationWindow {
|
||||
id: addressView
|
||||
width: parent.width - 200
|
||||
height: 200
|
||||
anchors.bottom: logView.top
|
||||
anchors.bottom: logLayout.top
|
||||
TableViewColumn{ role: "name"; title: "name" }
|
||||
TableViewColumn{ role: "address"; title: "address"; width: 300}
|
||||
|
||||
@ -296,14 +297,48 @@ ApplicationWindow {
|
||||
property var logModel: ListModel {
|
||||
id: logModel
|
||||
}
|
||||
TableView {
|
||||
id: logView
|
||||
RowLayout {
|
||||
id: logLayout
|
||||
width: parent.width
|
||||
height: 200
|
||||
anchors.bottom: parent.bottom
|
||||
TableViewColumn{ role: "description" ; title: "log" }
|
||||
TableView {
|
||||
id: logView
|
||||
headerVisible: false
|
||||
anchors {
|
||||
right: logLevelSlider.left
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
top: parent.top
|
||||
}
|
||||
|
||||
model: logModel
|
||||
TableViewColumn{ role: "description" ; title: "log" }
|
||||
|
||||
model: logModel
|
||||
}
|
||||
|
||||
Slider {
|
||||
id: logLevelSlider
|
||||
value: 1
|
||||
anchors {
|
||||
right: parent.right
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
|
||||
rightMargin: 5
|
||||
leftMargin: 5
|
||||
topMargin: 5
|
||||
bottomMargin: 5
|
||||
}
|
||||
|
||||
orientation: Qt.Vertical
|
||||
maximumValue: 3
|
||||
stepSize: 1
|
||||
|
||||
onValueChanged: {
|
||||
eth.setLogLevel(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -650,9 +685,20 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
function addLog(str) {
|
||||
if(str.len != 0) {
|
||||
logModel.insert(0, {description: str})
|
||||
// Remove first item once we've reached max log items
|
||||
if(logModel.count > 250) {
|
||||
logModel.remove(0)
|
||||
}
|
||||
|
||||
if(str.len != 0) {
|
||||
if(logView.flickableItem.atYEnd) {
|
||||
logModel.append({description: str})
|
||||
logView.positionViewAtRow(logView.rowCount - 1, ListView.Contain)
|
||||
} else {
|
||||
logModel.append({description: str})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function setPeers(text) {
|
||||
@ -768,6 +814,20 @@ ApplicationWindow {
|
||||
anchors.leftMargin: 5
|
||||
anchors.topMargin: 5
|
||||
|
||||
ListModel {
|
||||
id: denomModel
|
||||
ListElement { text: "Wei" ; zeros: "" }
|
||||
ListElement { text: "Ada" ; zeros: "000" }
|
||||
ListElement { text: "Babbage" ; zeros: "000000" }
|
||||
ListElement { text: "Shannon" ; zeros: "000000000" }
|
||||
ListElement { text: "Szabo" ; zeros: "000000000000" }
|
||||
ListElement { text: "Finney" ; zeros: "000000000000000" }
|
||||
ListElement { text: "Ether" ; zeros: "000000000000000000" }
|
||||
ListElement { text: "Einstein" ;zeros: "000000000000000000000" }
|
||||
ListElement { text: "Douglas" ; zeros: "000000000000000000000000000000000000000000" }
|
||||
}
|
||||
|
||||
|
||||
TextField {
|
||||
id: txFuelRecipient
|
||||
placeholderText: "Address / Name or empty for contract"
|
||||
@ -775,13 +835,21 @@ ApplicationWindow {
|
||||
width: 400
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: txValue
|
||||
width: 222
|
||||
placeholderText: "Amount"
|
||||
validator: RegExpValidator { regExp: /\d*/ }
|
||||
onTextChanged: {
|
||||
contractFormReady()
|
||||
RowLayout {
|
||||
TextField {
|
||||
id: txValue
|
||||
width: 222
|
||||
placeholderText: "Amount"
|
||||
validator: RegExpValidator { regExp: /\d*/ }
|
||||
onTextChanged: {
|
||||
contractFormReady()
|
||||
}
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
id: valueDenom
|
||||
currentIndex: 6
|
||||
model: denomModel
|
||||
}
|
||||
}
|
||||
|
||||
@ -807,7 +875,7 @@ ApplicationWindow {
|
||||
id: txGasPrice
|
||||
width: 200
|
||||
placeholderText: "Gas price"
|
||||
text: "1000000"
|
||||
text: "10"
|
||||
validator: RegExpValidator { regExp: /\d*/ }
|
||||
/*
|
||||
onTextChanged: {
|
||||
@ -815,6 +883,12 @@ ApplicationWindow {
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
id: gasDenom
|
||||
currentIndex: 4
|
||||
model: denomModel
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
@ -848,8 +922,9 @@ ApplicationWindow {
|
||||
]
|
||||
text: "Send"
|
||||
onClicked: {
|
||||
//this.enabled = false
|
||||
var res = eth.create(txFuelRecipient.text, txValue.text, txGas.text, txGasPrice.text, codeView.text)
|
||||
var value = txValue.text + denomModel.get(valueDenom.currentIndex).zeros;
|
||||
var gasPrice = txGasPrice.text + denomModel.get(gasDenom.currentIndex).zeros;
|
||||
var res = eth.create(txFuelRecipient.text, value, txGas.text, gasPrice, codeView.text)
|
||||
if(res[1]) {
|
||||
txResult.text = "Your contract <b>could not</b> be send over the network:\n<b>"
|
||||
txResult.text += res[1].error()
|
||||
|
@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/ethereum/eth-go"
|
||||
"github.com/ethereum/eth-go/ethchain"
|
||||
"github.com/ethereum/eth-go/ethutil"
|
||||
"github.com/ethereum/go-ethereum/ethereal/ui"
|
||||
"github.com/ethereum/go-ethereum/utils"
|
||||
@ -40,8 +39,6 @@ func main() {
|
||||
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
ethchain.InitFees()
|
||||
|
||||
g, err := globalconf.NewWithOptions(&globalconf.Options{
|
||||
Filename: path.Join(ethutil.ApplicationFolder(Datadir), "conf.ini"),
|
||||
})
|
||||
|
@ -56,7 +56,7 @@ func New(ethereum *eth.Ethereum) *Gui {
|
||||
}
|
||||
|
||||
func (gui *Gui) Start(assetPath string) {
|
||||
const version = "0.5.0 RC12"
|
||||
const version = "0.5.0 RC13"
|
||||
|
||||
defer gui.txDb.Close()
|
||||
|
||||
@ -69,7 +69,7 @@ func (gui *Gui) Start(assetPath string) {
|
||||
Init: func(p *ethpub.KeyVal, obj qml.Object) { p.Key = ""; p.Value = "" },
|
||||
}})
|
||||
|
||||
ethutil.Config.SetClientString(fmt.Sprintf("/Ethereal v%s", version))
|
||||
ethutil.Config.SetClientString("Ethereal")
|
||||
|
||||
// Create a new QML engine
|
||||
gui.engine = qml.NewEngine()
|
||||
@ -356,3 +356,7 @@ func (gui *Gui) ChangeClientId(id string) {
|
||||
func (gui *Gui) ClientId() string {
|
||||
return ethutil.Config.Identifier
|
||||
}
|
||||
|
||||
func (gui *Gui) SetLogLevel(level int) {
|
||||
ethutil.Config.Log.SetLevel(level)
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/ethereum/eth-go"
|
||||
"github.com/ethereum/eth-go/ethchain"
|
||||
"github.com/ethereum/eth-go/ethutil"
|
||||
"github.com/ethereum/go-ethereum/utils"
|
||||
"github.com/rakyll/globalconf"
|
||||
@ -86,8 +85,6 @@ func main() {
|
||||
logSys = log.New(os.Stdout, "", flags)
|
||||
}
|
||||
|
||||
ethchain.InitFees()
|
||||
|
||||
// Instantiated a eth stack
|
||||
ethereum, err := eth.New(eth.CapDefault, UseUPnP)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user