forked from cerc-io/plugeth
Merge branch 'develop' of github.com:ethereum/go-ethereum into develop
This commit is contained in:
commit
93d79babc9
@ -5,7 +5,7 @@ Ethereum
|
|||||||
|
|
||||||
Ethereum Go Client © 2014 Jeffrey Wilcke.
|
Ethereum Go Client © 2014 Jeffrey Wilcke.
|
||||||
|
|
||||||
Current state: Proof of Concept 5.0 RC7.
|
Current state: Proof of Concept 5.0 RC8.
|
||||||
|
|
||||||
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).
|
||||||
|
|
||||||
@ -39,7 +39,8 @@ Shared between ethereum and ethereal
|
|||||||
|
|
||||||
Ethereum only
|
Ethereum only
|
||||||
ethereum [options] [filename]
|
ethereum [options] [filename]
|
||||||
-js Start the JavaScript REPL
|
-js Start the JavaScript REPL
|
||||||
|
filename Load the given file and interpret as JavaScript
|
||||||
|
|
||||||
Etheral only
|
Etheral only
|
||||||
-asset_path absolute path to GUI assets directory
|
-asset_path absolute path to GUI assets directory
|
||||||
|
@ -67,6 +67,7 @@ ApplicationWindow {
|
|||||||
networkView.visible = false
|
networkView.visible = false
|
||||||
historyView.visible = false
|
historyView.visible = false
|
||||||
newTxView.visible = false
|
newTxView.visible = false
|
||||||
|
infoView.visible = false
|
||||||
view.visible = true
|
view.visible = true
|
||||||
//root.title = "Ethereal - " = view.title
|
//root.title = "Ethereal - " = view.title
|
||||||
}
|
}
|
||||||
@ -120,6 +121,17 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
source: ui.assetPath("net.png")
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: {
|
||||||
|
setView(infoView)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,6 +229,33 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: infoView
|
||||||
|
property var title: "Information"
|
||||||
|
visible: false
|
||||||
|
color: "#00000000"
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: addressLabel
|
||||||
|
text: "Address"
|
||||||
|
anchors {
|
||||||
|
margins: 5
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TextField {
|
||||||
|
anchors {
|
||||||
|
margins: 5
|
||||||
|
left: addressLabel.right
|
||||||
|
top: parent.top
|
||||||
|
}
|
||||||
|
text: pub.getKey().address
|
||||||
|
width: 500
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
signal addPlugin(string name)
|
signal addPlugin(string name)
|
||||||
Component {
|
Component {
|
||||||
|
@ -55,7 +55,7 @@ func New(ethereum *eth.Ethereum) *Gui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (gui *Gui) Start(assetPath string) {
|
func (gui *Gui) Start(assetPath string) {
|
||||||
const version = "0.5.0 RC7"
|
const version = "0.5.0 RC8"
|
||||||
|
|
||||||
defer gui.txDb.Close()
|
defer gui.txDb.Close()
|
||||||
|
|
||||||
@ -74,6 +74,7 @@ func (gui *Gui) Start(assetPath string) {
|
|||||||
|
|
||||||
// Expose the eth library and the ui library to QML
|
// Expose the eth library and the ui library to QML
|
||||||
context.SetVar("eth", gui)
|
context.SetVar("eth", gui)
|
||||||
|
context.SetVar("pub", gui.pub)
|
||||||
gui.uiLib = NewUiLib(gui.engine, gui.eth, assetPath)
|
gui.uiLib = NewUiLib(gui.engine, gui.eth, assetPath)
|
||||||
context.SetVar("ui", gui.uiLib)
|
context.SetVar("ui", gui.uiLib)
|
||||||
|
|
||||||
@ -164,7 +165,7 @@ func (gui *Gui) setWalletValue(amount, unconfirmedFunds *big.Int) {
|
|||||||
var str string
|
var str string
|
||||||
if unconfirmedFunds != nil {
|
if unconfirmedFunds != nil {
|
||||||
pos := "+"
|
pos := "+"
|
||||||
if unconfirmedFunds.Cmp(big.NewInt(0)) >= 0 {
|
if unconfirmedFunds.Cmp(big.NewInt(0)) < 0 {
|
||||||
pos = "-"
|
pos = "-"
|
||||||
}
|
}
|
||||||
val := ethutil.CurrencyToString(new(big.Int).Abs(ethutil.BigCopy(unconfirmedFunds)))
|
val := ethutil.CurrencyToString(new(big.Int).Abs(ethutil.BigCopy(unconfirmedFunds)))
|
||||||
@ -206,15 +207,10 @@ func (gui *Gui) update() {
|
|||||||
if txMsg.Event == "newTx:pre" {
|
if txMsg.Event == "newTx:pre" {
|
||||||
object := state.GetAccount(gui.addr)
|
object := state.GetAccount(gui.addr)
|
||||||
|
|
||||||
if bytes.Compare(tx.Sender(), gui.addr) == 0 && object.Nonce <= tx.Nonce {
|
if bytes.Compare(tx.Sender(), gui.addr) == 0 {
|
||||||
gui.win.Root().Call("addTx", ethpub.NewPTx(tx))
|
gui.win.Root().Call("addTx", ethpub.NewPTx(tx))
|
||||||
gui.txDb.Put(tx.Hash(), tx.RlpEncode())
|
gui.txDb.Put(tx.Hash(), tx.RlpEncode())
|
||||||
|
|
||||||
/*
|
|
||||||
object.Nonce += 1
|
|
||||||
state.SetStateObject(object)
|
|
||||||
*/
|
|
||||||
|
|
||||||
unconfirmedFunds.Sub(unconfirmedFunds, tx.Value)
|
unconfirmedFunds.Sub(unconfirmedFunds, tx.Value)
|
||||||
} else if bytes.Compare(tx.Recipient, gui.addr) == 0 {
|
} else if bytes.Compare(tx.Recipient, gui.addr) == 0 {
|
||||||
gui.win.Root().Call("addTx", ethpub.NewPTx(tx))
|
gui.win.Root().Call("addTx", ethpub.NewPTx(tx))
|
||||||
|
Loading…
Reference in New Issue
Block a user