code: func (s *PrivateAccountAPI) UnlockAccount(ctx context.Context, addr common.Address, password string, duration *uint64) (bool, error) {
  	// When the API is exposed by external RPC(http, ws etc), unless the user
  	// explicitly specifies to allow the insecure account unlocking, otherwise
  	// it is disabled.
  	if s.b.ExtRPCEnabled() && !s.b.AccountManager().Config().InsecureUnlockAllowed {
  		return false, errors.New("account unlock with HTTP access is forbidden")
  	}
  
  	const max = uint64(time.Duration(math.MaxInt64) / time.Second)
  	var d time.Duration
  	if duration == nil {
  		d = 300 * time.Second
  	} else if *duration > max {
  		return false, errors.New("unlock duration too large")
  	} else {
  		d = time.Duration(*duration) * time.Second
  	}
  	err := fetchKeystore(s.am).TimedUnlock(accounts.Account{Address: addr}, password, d)
  	if err != nil {
  		log.Warn("Failed account unlock attempt", "address", addr, "err", err)
  	}
  	return err == nil, err
  }
docs: // UnlockAccount will unlock the account associated with the given address with
  // the given password for duration seconds. If duration is nil it will use a
  // default of 300 seconds. It returns an indication if the account was unlocked.