提交 fc1d1f9a 编写于 作者: O obscuren

Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop

...@@ -238,13 +238,11 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) { ...@@ -238,13 +238,11 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) {
inout = "recv" inout = "recv"
} }
var ( ptx := xeth.NewTx(tx)
ptx = xeth.NewTx(tx) ptx.Sender = from.Hex()
send = from.Hex() if to := tx.To(); to != nil {
rec = tx.To().Hex() ptx.Address = to.Hex()
) }
ptx.Sender = send
ptx.Address = rec
if window == "post" { if window == "post" {
//gui.getObjectByName("transactionView").Call("addTx", ptx, inout) //gui.getObjectByName("transactionView").Call("addTx", ptx, inout)
......
...@@ -18,11 +18,11 @@ type DirectoryString struct { ...@@ -18,11 +18,11 @@ type DirectoryString struct {
Value string Value string
} }
func (self DirectoryString) String() string { func (self *DirectoryString) String() string {
return self.Value return self.Value
} }
func (self DirectoryString) Set(value string) error { func (self *DirectoryString) Set(value string) error {
self.Value = expandPath(value) self.Value = expandPath(value)
return nil return nil
} }
...@@ -72,9 +72,8 @@ func (self DirectoryFlag) Apply(set *flag.FlagSet) { ...@@ -72,9 +72,8 @@ func (self DirectoryFlag) Apply(set *flag.FlagSet) {
} }
eachName(self.Name, func(name string) { eachName(self.Name, func(name string) {
set.Var(self.Value, self.Name, "a: "+self.Usage) set.Var(&self.Value, self.Name, self.Usage)
}) })
} }
func prefixFor(name string) (prefix string) { func prefixFor(name string) (prefix string) {
......
...@@ -140,8 +140,11 @@ type Transaction struct { ...@@ -140,8 +140,11 @@ type Transaction struct {
func NewTx(tx *types.Transaction) *Transaction { func NewTx(tx *types.Transaction) *Transaction {
hash := tx.Hash().Hex() hash := tx.Hash().Hex()
receiver := tx.To().Hex()
if len(receiver) == 0 { var receiver string
if to := tx.To(); to != nil {
receiver = to.Hex()
} else {
receiver = core.AddressFromMessage(tx).Hex() receiver = core.AddressFromMessage(tx).Hex()
} }
sender, _ := tx.From() sender, _ := tx.From()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册