コード例 #1
0
        /// <summary>
        /// If BIP-65 is not enabled it will run as a <see cref="OP.NOP"/> (pre soft-fork) otherwise removes top stack item
        /// and converts it to a locktime to compare with the transction's <see cref="LockTime"/>.
        /// Return value indicates success.
        /// </summary>
        /// <param name="opData">Data to use</param>
        /// <param name="error">Error message (null if sucessful, otherwise will contain information about the failure)</param>
        /// <returns>True if operation was successful, false if otherwise</returns>
        public override bool Run(IOpData opData, out string error)
        {
            if (!opData.IsBip65Enabled)
            {
                error = null;
                return(true);
            }

            if (!TrySetLockTime(opData, out error))
            {
                return(false);
            }

            return(opData.CompareLocktimes(lt, out error));
        }