Update ledger info

        Arguments:
            ledger_id:
                Ledger id assigned by mCASH
            description:
                Description of the Ledger and it's usage
484090
def update_ledger(self, ledger_id, description=None):
        
        arguments = {'description': description}
        return self.do_req('PUT',
                           self.merchant_api_base_url + '/ledger/' +
                           ledger_id + '/', arguments)
1351676
def set_id(self,pid):
        
        if self.type == 'KAF':
            return self.node.set('pid',pid)
        elif self.type == 'NAF':
            return self.node.set('id',pid)
731825
def _send_view_change_done_message(self):
        
        new_primary_name = self.provider.next_primary_name()
        ledger_summary = self.provider.ledger_summary()
        message = ViewChangeDone(self.view_no,
                                 new_primary_name,
                                 ledger_summary)

        logger.info("{} is sending ViewChangeDone msg to all : {}".format(self, message))

        self.send(message)
        self._on_verified_view_change_done_msg(message, self.name)
920372
def update_linode(linode_id, update_args=None):
    '''
    
    '''
    update_args.update({'LinodeID': linode_id})

    result = _query('linode', 'update', args=update_args)

    return _clean_data(result)
649785
def usage() -> None:
    

    print()
    print('Usage: setnym.py <config-ini>')
    print()
    print('where <config-ini> represents the path to the configuration file.')
    print()
    print('The operation submits a nym to a trustee anchor to send to the ledger,')
    print('if the ledger does not have it already as configured.')
    print()
    print('The configuration file has sections and entries as follows:')
    print('  * section [Node Pool]:')
    print('    - name: the name of the node pool to which the operation applies')
    print('    - genesis.txn.path: the path to the genesis transaction file')
    print('        for the node pool (may omit if node pool already exists)')
    print('  * section [Trustee Anchor]:')
    print("    - name: the trustee anchor's (wallet) name")
    print("    - wallet.type: (default blank) the trustee anchor's wallet type")
    print("    - wallet.access: (default blank) the trustee anchor's")
    print('        wallet access credential (password) value')
    print('  * section [VON Anchor]:')
    print('    - role: the role to request in the send-nym transaction; specify:')
    print('        - (default) empty value for user with no additional write privileges')
    print('        - TRUST_ANCHOR for VON anchor with write privileges for indy artifacts')
    print('        - TRUSTEE for VON anchor sending further cryptonyms to the ledger')
    print("    - name: the VON anchor's (wallet) name")
    print("    - seed: the VON anchor's seed (optional, for wallet creation only)")
    print("    - did: the VON anchor's DID (optional, for wallet creation only)")
    print('    - wallet.create: whether create the wallet if it does not yet exist')
    print('        (value True/False, 1/0, or Yes/No)')
    print("    - wallet.type: (default blank) the VON anchor's wallet type")
    print("    - wallet.access: (default blank) the VON anchor's")
    print('        wallet access credential (password) value.')
    print()
635412
def update(self, id, **dict):
        ''''''
        if not self._item_path:
            raise AttributeError('update is not available for %s' % self._item_name)
        target = (self._update_path or self._item_path) % id
        payload = json.dumps({self._item_type:dict})
        self._redmine.put(target, payload)
        return None
860520
def set_paynet_id(payment_transaction, response)
      if response.payment_paynet_id
        payment_transaction.payment.paynet_id = response.payment_paynet_id
      end
    end
859508
def update(self, display_name=None, display_description=None):
        
        return self.manager.update(self, display_name=display_name,
                display_description=display_description)
1355470
def update(self, id, **kwargs):
        

        response = self.ghost.execute_put('%s/%s/' % (self._type_name, id), json={
            self._type_name: [
                kwargs
            ]
        })

        return self._model_type(response.get(self._type_name)[0])
1124546
def pack_mbap(transaction_id, protocol_id, length, unit_id):
    
    return struct.pack('>HHHB', transaction_id, protocol_id, length, unit_id)
26603
def update(collection_name, upsert, multi,
           spec, doc, safe, last_error_args, check_keys, opts):
    
    options = 0
    if upsert:
        options += 1
    if multi:
        options += 2

    data = _ZERO_32
    data += bson._make_c_string(collection_name)
    data += struct.pack("<i", options)
    data += bson.BSON.encode(spec, False, opts)
    encoded = bson.BSON.encode(doc, check_keys, opts)
    data += encoded
    if safe:
        (_, update_message) = __pack_message(2001, data)
        (request_id, error_message, _) = __last_error(collection_name,
                                                      last_error_args)
        return (request_id, update_message + error_message, len(encoded))
    else:
        (request_id, update_message) = __pack_message(2001, data)
        return (request_id, update_message, len(encoded))
497615
def transform_txn_for_ledger(txn):
        
        if get_type(txn) == ATTRIB:
            txn = DomainReqHandler.transform_attrib_for_ledger(txn)
        return txn
531131
def generate_transaction_id(stmt_line):
    
    return str(abs(hash((stmt_line.date,
                         stmt_line.memo,
                         stmt_line.amount))))
953531
function updatePackageID () {
  return new Promise((resolve) => {
    const oldPackageID = oldInfo.packageID
    const newPackageID = newInfo.packageID
    const androidPath = newInfo.androidPathToModule
    console.log(`Changing package ID from "${oldPackageID}" to "${newPackageID}"...`)

    replaceInFiles(RegExp(`(?=([ "'])).${oldPackageID}(?=[;"'])`), `$1${newPackageID}`, [
      'android/app/BUCK',
      'android/app/build.gradle',
      'android/app/src/main/AndroidManifest.xml',
      `${androidPath}/MainActivity.java`,
      `${androidPath}/MainApplication.java`,
    ])

    console.log('Package ID is updated.\n')
    resolve()
  })
}
798795
def _migrate_ledger(data_directory,
                    old_ledger_file, new_ledger_file,
                    serializer: MappingSerializer = None):
    

    # we should have ChunkedFileStorage implementation of the Ledger
    if not os.path.isdir(os.path.join(data_directory, old_ledger_file)):
        msg = 'Could not find directory {} for migration.'.format(
            old_ledger_file)
        logger.error(msg)
        raise Exception(msg)

    # open the current ledger using the specified serializer
    old_txn_log_store = ChunkedFileStore(data_directory,
                                         old_ledger_file,
                                         isLineNoKey=True,
                                         storeContentHash=False)
    logger.info("Old ledger folder: {}, {}".format(
        data_directory, old_ledger_file))
    old_ledger = Ledger(CompactMerkleTree(),
                        dataDir=data_directory,
                        txn_serializer=serializer,
                        hash_serializer=serializer,
                        fileName=old_ledger_file,
                        transactionLogStore=old_txn_log_store)
    logger.info("old size for {}: {}".format(
        old_ledger_file, str(old_ledger.size)))

    # open the new ledger with new serialization
    new_ledger_file_backup = new_ledger_file + "_new"
    logger.info("New ledger folder: {}, {}".format(
        data_directory, new_ledger_file_backup))
    new_ledger = Ledger(CompactMerkleTree(),
                        dataDir=data_directory,
                        fileName=new_ledger_file_backup)

    # add all txns into the new ledger
    for _, txn in old_ledger.getAllTxn():
        if txn[TXN_TYPE] == SCHEMA:
            if DATA in txn:
                txn[DATA] = json.loads(txn[DATA])
        if txn[TXN_TYPE] == CLAIM_DEF:
            if DATA in txn:
                txn[DATA] = json.loads(txn[DATA])
        new_ledger.add(txn)
    logger.info("new size for {}: {}".format(
        new_ledger_file, str(new_ledger.size)))

    old_ledger.stop()
    new_ledger.stop()

    # now that everything succeeded, remove the old files and move the new
    # files into place
    shutil.rmtree(
        os.path.join(data_directory, old_ledger_file))
    os.rename(
        os.path.join(data_directory, new_ledger_file_backup),
        os.path.join(data_directory, new_ledger_file))

    logger.info("Final new ledger folder: {}".format(
        os.path.join(data_directory, new_ledger_file)))
490087
def _update_sig(self, m, key):
        
        if self.sig_alg is None:
            if self.tls_session.tls_version >= 0x0300:
                self.sig_val = key.sign(m, t='pkcs', h='md5-sha1')
            else:
                self.sig_val = key.sign(m, t='pkcs', h='md5')
        else:
            h, sig = _tls_hash_sig[self.sig_alg].split('+')
            if sig.endswith('pss'):
                t = "pss"
            else:
                t = "pkcs"
            self.sig_val = key.sign(m, t=t, h=h)
397400
def _update_info(self):
        
        super(TableHDU, self)._update_info()
        if self._info['hdutype'] == IMAGE_HDU:
            mess = "Extension %s is not a Table HDU" % self.ext
            raise ValueError(mess)
        if 'colinfo' in self._info:
            self._colnames = [i['name'] for i in self._info['colinfo']]
            self._colnames_lower = [
                i['name'].lower() for i in self._info['colinfo']]
            self._ncol = len(self._colnames)