Verify the transaction.

        Args:
            mempool:

        Returns:
            bool: True if verified. False otherwise.
552907
def Verify(self, mempool):
        

        for descriptor in self.Descriptors:
            if not descriptor.Verify():
                return False

        return super(StateTransaction, self).Verify(mempool)
680230
def _verify_token(self):
        
        res = self._session.get(self._token_verification_url)
        if not res.ok:
            raise exceptions.BadToken(consts.LOG_MSG_BAD_TOKEN)
        return True
1125676
def verified(self):
        
        for who, record in self.logs:
            if record["field_name"] == "status" \
                    and record["added"] == "VERIFIED":
                return True
        return False
292605
def verify(otp, counter, retries: 0)
      counters = (counter..counter + retries).to_a
      counters.find do |c|
        super(otp, at(c))
      end
    end
1285723
def Verify(self, completely=False):
        
        res = super(Block, self).Verify()
        if not res:
            return False

        from neo.Blockchain import GetBlockchain, GetConsensusAddress

        # first TX has to be a miner transaction. other tx after that cant be miner tx
        if self.Transactions[0].Type != TransactionType.MinerTransaction:
            return False
        for tx in self.Transactions[1:]:
            if tx.Type == TransactionType.MinerTransaction:
                return False

        if completely:
            bc = GetBlockchain()

            if self.NextConsensus != GetConsensusAddress(bc.GetValidators(self.Transactions).ToArray()):
                return False

            for tx in self.Transactions:
                if not tx.Verify():
                    pass
            logger.error("Blocks cannot be fully validated at this moment.  please pass completely=False")
            raise NotImplementedError()
            # do this below!
            # foreach(Transaction tx in Transactions)
            # if (!tx.Verify(Transactions.Where(p = > !p.Hash.Equals(tx.Hash)))) return false;
            # Transaction tx_gen = Transactions.FirstOrDefault(p= > p.Type == TransactionType.MinerTransaction);
            # if (tx_gen?.Outputs.Sum(p = > p.Value) != CalculateNetFee(Transactions)) return false;

        return True
1227361
def verify(self):
        
        with ffi.OutputString() as outmsg:
            if ffi.lib.LLVMPY_VerifyModule(self, outmsg):
                raise RuntimeError(str(outmsg))
79124
def get_transaction(self, clear=False):
        
        transaction = getattr(self.thread_local, "transaction", None)
        if clear:
            self.thread_local.transaction = None
        return transaction
820737
def assert_valid(self):
        
        assert self.trntype in TRANSACTION_TYPES, \
            "trntype must be one of %s" % TRANSACTION_TYPES

        if self.bank_account_to:
            self.bank_account_to.assert_valid()
1129811
def _Verify(self):
    

    # If the list of expected calls is not empty, raise an exception
    if self._expected_calls_queue:
      # The last MultipleTimesGroup is not popped from the queue.
      if (len(self._expected_calls_queue) == 1 and
          isinstance(self._expected_calls_queue[0], MultipleTimesGroup) and
          self._expected_calls_queue[0].IsSatisfied()):
        pass
      else:
        raise ExpectedMethodCallsError(self._expected_calls_queue)
1328569
def modify_mempool(mempool, remove=0, add=0, verbose=False):
    
    for i in range(remove):
        popped = mempool.pop()
        if verbose: print("removed:", popped)

    for i in range(add):
        new_txid = _make_txid()
        mempool.append(new_txid)
        if verbose: print("added:", new_txid)

    return mempool
1248008
def verify(verified_entity, verification_key):
        
        verification = get_object_or_none(Verification, verified_entity=verified_entity)

        if verification is None:
            raise ServerError(VerificationHandler.STATUS_VERIFICATION_NOT_FOUND)
        if not verification.verify(verification_key):
            raise ServerError(VerificationHandler.STATUS_INVALID_VERIFICATION_KEY)

        verification.verified = True
        verification.save()
639388
def verify(self):
        
        # if we are in a lock don't check anything
        if self._lock != 0:
            return

        # check the hash of our data
        id_new = self._id_function()

        # things changed
        if id_new != self.id_current:
            if len(self.cache) > 0:
                log.debug('%d items cleared from cache: %s',
                          len(self.cache),
                          str(list(self.cache.keys())))
            # hash changed, so dump the cache
            # do it manually rather than calling clear()
            # as we are internal logic and can avoid function calls
            self.cache = {}
            # set the id to the new data hash
            self.id_current = id_new
811461
def verify(self, verifier, consumer_key=None, consumer_secret=None,
               access_token=None, access_token_secret=None):
        
        # Stored values can be supplied to verify
        self.consumer_key = consumer_key or self.consumer_key
        self.consumer_secret = consumer_secret or self.consumer_secret
        self.access_token = access_token or self.access_token
        self.access_token_secret = access_token_secret or self.access_token_secret

        oauth = OAuth1(
            self.consumer_key,
            client_secret=self.consumer_secret,
            resource_owner_key=self.access_token,
            resource_owner_secret=self.access_token_secret,
            verifier=verifier)
        r = requests.post(self.url('ACCESS_TOKEN'), auth=oauth)
        if r.status_code == 200:
            creds = parse_qs(r.content)
        else:
            return (False, r.content)

        self.finalize_oauth(creds.get('oauth_token')[0],
                            creds.get('oauth_token_secret')[0])
        return (True, None)
1181405
def verify(self):
        

        # remember file pointer
        pos = self.tell()
        self.seek(0)

        checksum = 0
        for chunk in iter(lambda: self.read(1024), b''):
            checksum = crc32(chunk, checksum)

        # restore file pointer
        self.seek(pos)

        return self.crc32 == checksum & 0xffffffff
728208
def verify(self, connection_type=None):
        
        req_body = self._cli.make_body(connectionType=connection_type)

        resp = self.action('verify', **req_body)
        resp.raise_if_err()
        return resp
160972
def verify(self, token, verifying_key_or_keys, num_required=None):
        
        if not isinstance(verifying_key_or_keys, (list, str, unicode)):
            raise ValueError("Invalid verifying key(s): expected list or string")

        if isinstance(verifying_key_or_keys, list):
            return self._verify_multi(token, verifying_key_or_keys, num_required=num_required)

        else:
            return self._verify_single(token, str(verifying_key_or_keys))
816004
def validateCommit(self, commit: Commit, sender: str) -> bool:
        
        key = (commit.viewNo, commit.ppSeqNo)
        if not self.has_prepared(key):
            self.enqueue_commit(commit, sender)
            return False

        if self.commits.hasCommitFrom(commit, sender):
            raise SuspiciousNode(sender, Suspicions.DUPLICATE_CM_SENT, commit)

        # BLS multi-sig:
        pre_prepare = self.getPrePrepare(commit.viewNo, commit.ppSeqNo)
        why_not = self._bls_bft_replica.validate_commit(commit, sender, pre_prepare)

        if why_not == BlsBftReplica.CM_BLS_SIG_WRONG:
            self.logger.warning("{} discard Commit message from "
                                "{}:{}".format(self, sender, commit))
            raise SuspiciousNode(sender,
                                 Suspicions.CM_BLS_SIG_WRONG,
                                 commit)
        elif why_not is not None:
            self.logger.warning("Unknown error code returned for bls commit "
                                "validation {}".format(why_not))

        return True