示例#1
0
        public (bool Allowed, string Reason) IsAllowed(Transaction tx, BlockHeader parentHeader)
        {
            (bool Allowed, string Reason)result = _minGasPriceFilter.IsAllowed(tx, parentHeader);
            if (!result.Allowed)
            {
                return(result);
            }
            else if (_minGasPrices.TryGetValue(parentHeader, tx, out TxPriorityContract.Destination @override))
            {
                return(_minGasPriceFilter.IsAllowed(tx, parentHeader, @override.Value));
            }

            return(true, string.Empty);
        }
        public AcceptTxResult IsAllowed(Transaction tx, BlockHeader parentHeader)
        {
            AcceptTxResult isAllowed = _minGasPriceFilter.IsAllowed(tx, parentHeader);

            if (!isAllowed)
            {
                return(isAllowed);
            }
            else if (_minGasPrices.TryGetValue(parentHeader, tx, out TxPriorityContract.Destination @override))
            {
                return(_minGasPriceFilter.IsAllowed(tx, parentHeader, @override.Value));
            }

            return(AcceptTxResult.Accepted);
        }