diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-06-02 04:00:48 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-06-02 04:12:03 +0800 |
commit | 147a699c6543b1e4ec8c933f8aaff4e0639897b6 (patch) | |
tree | 68c4548d27cb053940ac8a3ef19043b57bae80ab /xeth | |
parent | 5b14fdb94b61af9f17f53593766a706c9780a7be (diff) | |
download | go-tangerine-147a699c6543b1e4ec8c933f8aaff4e0639897b6.tar go-tangerine-147a699c6543b1e4ec8c933f8aaff4e0639897b6.tar.gz go-tangerine-147a699c6543b1e4ec8c933f8aaff4e0639897b6.tar.bz2 go-tangerine-147a699c6543b1e4ec8c933f8aaff4e0639897b6.tar.lz go-tangerine-147a699c6543b1e4ec8c933f8aaff4e0639897b6.tar.xz go-tangerine-147a699c6543b1e4ec8c933f8aaff4e0639897b6.tar.zst go-tangerine-147a699c6543b1e4ec8c933f8aaff4e0639897b6.zip |
Add missing err checks on From() (skip RPC for now)
Diffstat (limited to 'xeth')
-rw-r--r-- | xeth/types.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xeth/types.go b/xeth/types.go index 1be5e109c..3bb1447ca 100644 --- a/xeth/types.go +++ b/xeth/types.go @@ -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 |