[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 c616391df2
This commit is contained in:
@ -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))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user