def commit_batch(self):
        """

        :param state_root: committed state root
        :param ledger_size: committed ledger size
        :return: tuple of next committed state and count of committed transactions
        """
        if len(self.un_committed) == 0:
            raise PlenumValueError("un_committed",
                                   self.un_committed,
                                   "commit_batch was called, but there is no tracked uncommitted states")
        last_committed_size_before = self.last_committed[2]
        uncommitted_hash, uncommitted_txn_root, uncommitted_size = self.un_committed.popleft()
        self.set_last_committed(uncommitted_hash, uncommitted_txn_root, uncommitted_size)
        return uncommitted_hash, uncommitted_txn_root, uncommitted_size - last_committed_size_before
def commit_batch ( self ) : if len ( self . un_committed ) == 0 : raise PlenumValueError ( "un_committed" , self . un_committed , "commit_batch was called, but there is no tracked uncommitted states" ) last_committed_size_before = self . last_committed [ 2 ] uncommitted_hash , uncommitted_txn_root , uncommitted_size = self . un_committed . popleft ( ) self . set_last_committed ( uncommitted_hash , uncommitted_txn_root , uncommitted_size ) return uncommitted_hash , uncommitted_txn_root , uncommitted_size - last_committed_size_before
:param state_root: committed state root
        :param ledger_size: committed ledger size
        :return: tuple of next committed state and count of committed transactions