Add missing err checks on From() (skip RPC for now)

This commit is contained in:
Gustav Simonsson
2015-06-01 22:00:48 +02:00
parent 5b14fdb94b
commit 147a699c65
4 changed files with 25 additions and 18 deletions

View File

@ -139,6 +139,10 @@ type Transaction struct {
}
func NewTx(tx *types.Transaction) *Transaction {
sender, err := tx.From()
if err != nil {
return nil
}
hash := tx.Hash().Hex()
var receiver string
@ -147,7 +151,6 @@ func NewTx(tx *types.Transaction) *Transaction {
} else {
receiver = core.AddressFromMessage(tx).Hex()
}
sender, _ := tx.From()
createsContract := core.MessageCreatesContract(tx)
var data string