function clearExpiredFreezing(address addr) public {
        var nodes = c_freezing_list[addr];
        uint length = nodes.length;

        
        uint left = 0;
        while (left < length) {
            
            if (nodes[left].end_stamp <= block.timestamp) {
                break;
            }
            left++;
        }

        
        uint right = left + 1;
        while (left < length && right < length) {
            
            if (nodes[right].end_stamp > block.timestamp) {
                nodes[left] = nodes[right];
                left++;
            }
            right++;
        }
        if (length != left) {
            nodes.length = left;
            ClearExpiredFreezingEvent(addr);
        }
    }