aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2014-06-23 19:06:45 +0800
committerzelig <viktor.tron@gmail.com>2014-06-23 19:06:45 +0800
commitc67cdab22162792f40cb366cbf12960c306aa835 (patch)
treeac220944d05ff384b8d3c79a56c709b705fbac05
parentd060ae6a368bb880132e548c58b33e2508adc125 (diff)
parent2408e38218d81c567bdaa4671a542a20c55490b9 (diff)
downloadgo-tangerine-c67cdab22162792f40cb366cbf12960c306aa835.tar.gz
go-tangerine-c67cdab22162792f40cb366cbf12960c306aa835.tar.zst
go-tangerine-c67cdab22162792f40cb366cbf12960c306aa835.zip
merge upstream
-rw-r--r--README.md2
-rw-r--r--ethereal/assets/samplecoin/samplecoin.html4
-rw-r--r--ethereal/ui/debugger.go5
-rw-r--r--ethereal/ui/gui.go2
-rw-r--r--ethereal/ui/ui_lib.go51
5 files changed, 7 insertions, 57 deletions
diff --git a/README.md b/README.md
index eee24f71e..7dc1999c3 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ Ethereum
Ethereum Go Client © 2014 Jeffrey Wilcke.
-Current state: Proof of Concept 5.0 RC13.
+Current state: Proof of Concept 5.0 RC14.
For the development package please see the [eth-go package](https://github.com/ethereum/eth-go).
diff --git a/ethereal/assets/samplecoin/samplecoin.html b/ethereal/assets/samplecoin/samplecoin.html
index dc8d0b7e9..7b63f78e4 100644
--- a/ethereal/assets/samplecoin/samplecoin.html
+++ b/ethereal/assets/samplecoin/samplecoin.html
@@ -9,7 +9,7 @@
<script type="text/javascript">
-var jefcoinAddr = "de0bd4ea1947deabf1749d7ed633f289358c9f6c"
+var jefcoinAddr = "22fa3ebce6ef9ca661a960104d3087eec040011e"
var mAddr = ""
function createTransaction() {
@@ -17,7 +17,7 @@ function createTransaction() {
var amount = document.querySelector("#amount").value.pad(32);
var data = (addr + amount).unbin();
- eth.transact(mAddr, jefcoinAddr, 0, "10000000", "250", data, function(receipt) {
+ eth.transact(mAddr, jefcoinAddr, 0, "50000", "1000000", data, function(receipt) {
debug("received tx hash:", reciept.address)
})
}
diff --git a/ethereal/ui/debugger.go b/ethereal/ui/debugger.go
index 919407b34..9d60c7587 100644
--- a/ethereal/ui/debugger.go
+++ b/ethereal/ui/debugger.go
@@ -78,7 +78,6 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
var err error
script := ethutil.StringToByteFunc(scriptStr, func(s string) (ret []byte) {
ret, err = ethutil.Compile(s)
- fmt.Printf("%x\n", ret)
return
})
@@ -110,14 +109,16 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
block := self.lib.eth.BlockChain().CurrentBlock
vm := ethchain.NewVm(state, self.lib.eth.StateManager(), ethchain.RuntimeVars{
+ Block: block,
Origin: account.Address(),
- BlockNumber: block.BlockInfo().Number,
+ BlockNumber: block.Number,
PrevHash: block.PrevHash,
Coinbase: block.Coinbase,
Time: block.Time,
Diff: block.Difficulty,
Value: ethutil.Big(valueStr),
})
+ vm.Verbose = true
self.Db.done = false
self.Logf("callsize %d", len(script))
diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go
index d3b298d90..ed29e2485 100644
--- a/ethereal/ui/gui.go
+++ b/ethereal/ui/gui.go
@@ -60,7 +60,7 @@ func New(ethereum *eth.Ethereum, logLevel ethlog.LogLevel) *Gui {
}
func (gui *Gui) Start(assetPath string) {
- const version = "0.5.0 RC13"
+ const version = "0.5.0 RC14"
defer gui.txDb.Close()
diff --git a/ethereal/ui/ui_lib.go b/ethereal/ui/ui_lib.go
index eb607aac5..2dd66f4fd 100644
--- a/ethereal/ui/ui_lib.go
+++ b/ethereal/ui/ui_lib.go
@@ -3,7 +3,6 @@ package ethui
import (
"bitbucket.org/kardianos/osext"
"github.com/ethereum/eth-go"
- "github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethutil"
"github.com/go-qml/qml"
"os"
@@ -138,53 +137,3 @@ func DefaultAssetPath() string {
return base
}
-
-func (ui *UiLib) DebugTx(recipient, valueStr, gasStr, gasPriceStr, data string) {
- state := ui.eth.BlockChain().CurrentBlock.State()
-
- script, err := ethutil.Compile(data)
- if err != nil {
- logger.Debugln(err)
-
- return
- }
-
- dis := ethchain.Disassemble(script)
- ui.win.Root().Call("clearAsm")
-
- for _, str := range dis {
- ui.win.Root().Call("setAsm", str)
- }
- // Contract addr as test address
- keyPair := ethutil.GetKeyRing().Get(0)
- callerTx :=
- ethchain.NewContractCreationTx(ethutil.Big(valueStr), ethutil.Big(gasStr), ethutil.Big(gasPriceStr), script)
- callerTx.Sign(keyPair.PrivateKey)
-
- account := ui.eth.StateManager().TransState().GetStateObject(keyPair.Address())
- contract := ethchain.MakeContract(callerTx, state)
- callerClosure := ethchain.NewClosure(account, contract, contract.Init(), state, ethutil.Big(gasStr), ethutil.Big(gasPriceStr))
-
- block := ui.eth.BlockChain().CurrentBlock
- vm := ethchain.NewVm(state, ui.eth.StateManager(), ethchain.RuntimeVars{
- Origin: account.Address(),
- BlockNumber: block.BlockInfo().Number,
- PrevHash: block.PrevHash,
- Coinbase: block.Coinbase,
- Time: block.Time,
- Diff: block.Difficulty,
- })
-
- ui.Db.done = false
- go func() {
- callerClosure.Call(vm, contract.Init(), ui.Db.halting)
-
- state.Reset()
-
- ui.Db.done = true
- }()
-}
-
-func (ui *UiLib) Next() {
- ui.Db.Next()
-}