code: func (ks *KeyStore) SignTx(a accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) {
  	// Look up the key to sign with and abort if it cannot be found
  	ks.mu.RLock()
  	defer ks.mu.RUnlock()
  
  	unlockedKey, found := ks.unlocked[a.Address]
  	if !found {
  		return nil, ErrLocked
  	}
  	// Depending on the presence of the chain ID, sign with EIP155 or homestead
  	if chainID != nil {
  		return types.SignTx(tx, types.NewEIP155Signer(chainID), unlockedKey.PrivateKey)
  	}
  	return types.SignTx(tx, types.HomesteadSigner{}, unlockedKey.PrivateKey)
  }
docs: // SignTx signs the given transaction with the requested account.