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

This commit is contained in:
obscuren 2015-04-10 11:03:46 +02:00
commit fc1d1f9afd
3 changed files with 13 additions and 13 deletions

View File

@ -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)

View File

@ -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) {

View File

@ -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()