function calcAndSetPlayerTotalCanAccept(address pAddr, uint256 acceptAmount) private {
        uint256 _now = block.timestamp;
        uint256 _latestCalced = players_[pAddr].lastCalcOfferNo;
        uint256 _acceptedAmount = acceptAmount;

        while(_latestCalced < players_[pAddr].offeredCount) {
            FMAPDatasets.OfferInfo storage oi = playerOfferOrders_[pAddr][_latestCalced];
            uint256 _ts = _now.sub(oi.timestamp);
            if (oi.interesting == true) {
                if (_ts >= maxInterestTime_) {                    
                    
                    uint256 interest1 = oi.offerAmount.sub(oi.acceptAmount).mul(1).div(1000).mul(maxInterestTime_ / interestPeriod_); 
                    players_[pAddr].canAccept = (players_[pAddr].canAccept).add(oi.offerAmount).add(interest1);
                    oi.interesting = false;

                    
                    if (oi.offerAmount.sub(oi.acceptAmount) > _acceptedAmount) {
                        _acceptedAmount = 0;
                        oi.acceptAmount = oi.acceptAmount.add(_acceptedAmount);
                    } else {
                        _acceptedAmount = _acceptedAmount.sub(oi.offerAmount.sub(oi.acceptAmount));
                        oi.acceptAmount = oi.offerAmount;
                    }
                } else if (_acceptedAmount > 0) {
                    if (_acceptedAmount < oi.offerAmount.sub(oi.acceptAmount)) {
                        oi.acceptAmount = oi.acceptAmount.add(_acceptedAmount);
                        _acceptedAmount = 0;
                    } else {
                        uint256 interest0 = oi.offerAmount.sub(oi.acceptAmount).mul(1).div(1000).mul(_ts / interestPeriod_);
                        players_[pAddr].canAccept = (players_[pAddr].canAccept).add(oi.offerAmount).add(interest0);
                        oi.interesting = false;
                        
                        _acceptedAmount = _acceptedAmount.sub(oi.offerAmount.sub(oi.acceptAmount));
                        oi.acceptAmount = oi.offerAmount;
            
                    }
                }
            } else if (oi.offerAmount > oi.acceptAmount && _acceptedAmount > 0) {
                
                if (oi.offerAmount.sub(oi.acceptAmount) > _acceptedAmount) {
                    _acceptedAmount = 0;
                    oi.acceptAmount = oi.acceptAmount.add(_acceptedAmount);
                } else {
                    _acceptedAmount = _acceptedAmount.sub(oi.offerAmount.sub(oi.acceptAmount));
                    oi.acceptAmount = oi.offerAmount;
                }
            }
            if (_acceptedAmount == 0) {
                break;
            }
            _latestCalced = _latestCalced + 1;
        }
        players_[pAddr].lastCalcOfferNo = _latestCalced;
    }