Merge pull request #305 from maticnetwork/arpit/v0.2.13-patch-1

fix sender pending txn
This commit is contained in:
Sandeep Sreenath 2022-01-21 14:00:06 +05:30 committed by GitHub
commit 0a63620819
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1422,10 +1422,12 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
// newRPCPendingTransaction returns a pending transaction that will serialize to the RPC representation
func newRPCPendingTransaction(tx *types.Transaction, current *types.Header, config *params.ChainConfig) *RPCTransaction {
var baseFee *big.Int
blockNumber := uint64(0)
if current != nil {
baseFee = misc.CalcBaseFee(config, current)
blockNumber = current.Number.Uint64()
}
return newRPCTransaction(tx, common.Hash{}, 0, 0, baseFee, config)
return newRPCTransaction(tx, common.Hash{}, blockNumber, 0, baseFee, config)
}
// newRPCTransactionFromBlockIndex returns a transaction that will serialize to the RPC representation.