code: func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
  	// Heuristic limit, reject transactions over 32KB to prevent DOS attacks
  	if tx.Size() > 32*1024 {
  		return ErrOversizedData
  	}
  	// Transactions can't be negative. This may never happen using RLP decoded
  	// transactions but may occur if you create a transaction using the RPC.
  	if tx.Value().Sign() < 0 {
  		return ErrNegativeValue
  	}
  	// Ensure the transaction doesn't exceed the current block limit gas.
  	if pool.currentMaxGas < tx.Gas() {
  		return ErrGasLimit
  	}
  	// Make sure the transaction is signed properly
  	from, err := types.Sender(pool.signer, tx)
  	if err != nil {
  		return ErrInvalidSender
  	}
  	// Drop non-local transactions under our own minimal accepted gas price
  	local = local || pool.locals.contains(from) // account may be local even if the transaction arrived from the network
  	if !local && pool.gasPrice.Cmp(tx.GasPrice()) > 0 {
  		return ErrUnderpriced
  	}
  	// Ensure the transaction adheres to nonce ordering
  	if pool.currentState.GetNonce(from) > tx.Nonce() {
  		return ErrNonceTooLow
  	}
  	// Transactor should have enough funds to cover the costs
  	// cost == V + GP * GL
  	if pool.currentState.GetBalance(from).Cmp(tx.Cost()) < 0 {
  		return ErrInsufficientFunds
  	}
  	intrGas, err := IntrinsicGas(tx.Data(), tx.To() == nil, pool.homestead)
  	if err != nil {
  		return err
  	}
  	if tx.Gas() < intrGas {
  		return ErrIntrinsicGas
  	}
  	return nil
  }
docs: // validateTx checks whether a transaction is valid according to the consensus
  // rules and adheres to some heuristic limits of the local node (price and size).