aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-10 17:03:46 +0800
committerobscuren <geffobscura@gmail.com>2015-04-10 17:03:46 +0800
commitfc1d1f9afd155fab1f614c6a0340233f90afafd6 (patch)
tree3bcccd5f4f5a3400763820e5f529b4697c57dabe
parent3755cfccb366f165951a5f3e03c58bde91ff1e4a (diff)
parent20fd60902b5c6bea7b7d9fb7b9031ce5925bffc4 (diff)
downloadgo-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar
go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar.gz
go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar.bz2
go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar.lz
go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar.xz
go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.tar.zst
go-tangerine-fc1d1f9afd155fab1f614c6a0340233f90afafd6.zip
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
-rw-r--r--cmd/mist/gui.go12
-rw-r--r--cmd/utils/customflags.go7
-rw-r--r--xeth/types.go7
3 files changed, 13 insertions, 13 deletions
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index d37d6f81b..66614478c 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -238,13 +238,11 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) {
inout = "recv"
}
- var (
- ptx = xeth.NewTx(tx)
- send = from.Hex()
- rec = tx.To().Hex()
- )
- ptx.Sender = send
- ptx.Address = rec
+ ptx := xeth.NewTx(tx)
+ ptx.Sender = from.Hex()
+ if to := tx.To(); to != nil {
+ ptx.Address = to.Hex()
+ }
if window == "post" {
//gui.getObjectByName("transactionView").Call("addTx", ptx, inout)
diff --git a/cmd/utils/customflags.go b/cmd/utils/customflags.go
index a623ae19c..78a6b8d22 100644
--- a/cmd/utils/customflags.go
+++ b/cmd/utils/customflags.go
@@ -18,11 +18,11 @@ type DirectoryString struct {
Value string
}
-func (self DirectoryString) String() string {
+func (self *DirectoryString) String() string {
return self.Value
}
-func (self DirectoryString) Set(value string) error {
+func (self *DirectoryString) Set(value string) error {
self.Value = expandPath(value)
return nil
}
@@ -72,9 +72,8 @@ func (self DirectoryFlag) Apply(set *flag.FlagSet) {
}
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) {
diff --git a/xeth/types.go b/xeth/types.go
index 739092474..1be5e109c 100644
--- a/xeth/types.go
+++ b/xeth/types.go
@@ -140,8 +140,11 @@ type Transaction struct {
func NewTx(tx *types.Transaction) *Transaction {
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()
}
sender, _ := tx.From()