aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/eth.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2016-02-29 06:36:00 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2016-02-29 20:24:33 +0800
commit7f83e68b13d573a532dd907a7ff2252241de36e4 (patch)
tree1950fe312ac37fd75fd979d80c2fff76243a934e /rpc/api/eth.go
parent5570b1139839ab48af6c851de809c90920e1e739 (diff)
downloadgo-tangerine-7f83e68b13d573a532dd907a7ff2252241de36e4.tar
go-tangerine-7f83e68b13d573a532dd907a7ff2252241de36e4.tar.gz
go-tangerine-7f83e68b13d573a532dd907a7ff2252241de36e4.tar.bz2
go-tangerine-7f83e68b13d573a532dd907a7ff2252241de36e4.tar.lz
go-tangerine-7f83e68b13d573a532dd907a7ff2252241de36e4.tar.xz
go-tangerine-7f83e68b13d573a532dd907a7ff2252241de36e4.tar.zst
go-tangerine-7f83e68b13d573a532dd907a7ff2252241de36e4.zip
[release/1.3.4] eth: fixed homestead tx check
When a block is queried for retrieval we should add a check whether the block falls within the frontier rules. If we'd always use `From` retrieving transaction might fail. This PR temporarily changes everything to `FromFrontier` (safe!). This is a backport of c616391df2dda2c21b0a8eed03531a7d44669421
Diffstat (limited to 'rpc/api/eth.go')
-rw-r--r--rpc/api/eth.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/api/eth.go b/rpc/api/eth.go
index db7a643d8..a78e492ff 100644
--- a/rpc/api/eth.go
+++ b/rpc/api/eth.go
@@ -661,7 +661,7 @@ func (self *ethApi) Resend(req *shared.Request) (interface{}, error) {
pending := self.ethereum.TxPool().GetTransactions()
for _, p := range pending {
- if pFrom, err := p.From(); err == nil && pFrom == from && p.SigHash() == args.Tx.tx.SigHash() {
+ if pFrom, err := p.FromFrontier(); err == nil && pFrom == from && p.SigHash() == args.Tx.tx.SigHash() {
self.ethereum.TxPool().RemoveTx(common.HexToHash(args.Tx.Hash))
return self.xeth.Transact(args.Tx.From, args.Tx.To, args.Tx.Nonce, args.Tx.Value, args.GasLimit, args.GasPrice, args.Tx.Data)
}
@@ -688,7 +688,7 @@ func (self *ethApi) PendingTransactions(req *shared.Request) (interface{}, error
var ltxs []*tx
for _, tx := range txs {
- if from, _ := tx.From(); accountSet.Has(from) {
+ if from, _ := tx.FromFrontier(); accountSet.Has(from) {
ltxs = append(ltxs, newTx(tx))
}
}