private static LedgerStruct.Channel _updateChannelStatus(LedgerStruct.Channel _c, byte _newStatus)
        {
            if (_c.status == _newStatus)
            {
                return(_c);
            }
            LedgerStruct.ChannelStatus channelStatus = LedgerStruct.getStandardChannelStatus();
            // update counter of old status
            if (_c.status != channelStatus.Uninitialized)
            {
                LedgerStruct.setChannelStatusNums(_c.status, LedgerStruct.getChannelStatusNums(_c.status) - 1);
            }

            // update counter of new status
            LedgerStruct.setChannelStatusNums(_newStatus, LedgerStruct.getChannelStatusNums(_newStatus) + 1);

            _c.status = _newStatus;

            return(_c);
        }
 public static BigInteger getChannelStatusNum(BigInteger _channelStatus)
 {
     return(LedgerStruct.getChannelStatusNums(_channelStatus));
 }