BitSharp.Core.Rules.CoreRules.IsFinal C# (CSharp) 메소드

IsFinal() 개인적인 메소드

private IsFinal ( BitSharp.Core.Domain.Transaction tx, int blockHeight, long blockTime ) : bool
tx BitSharp.Core.Domain.Transaction
blockHeight int
blockTime long
리턴 bool
        private bool IsFinal(Transaction tx, int blockHeight, long blockTime)
        {
            // no tx lock time specified, transaction is final
            if (tx.LockTime == 0)
                return true;

            // lock time is compared by block height before LOCKTIME_THRESHOLD, block time afterwards
            var blockLockTime = (tx.LockTime < LOCKTIME_THRESHOLD ? blockHeight : blockTime);

            // if block's time is after tx's lock time, transaction is final
            if (blockLockTime >= tx.LockTime)
                return true;

            // if tx's lock time hasn't yet been reached, the transaction is final if all its inputs are final
            return tx.Inputs.All(x => IsFinal(x));
        }

Same methods

CoreRules::IsFinal ( BitSharp.Core.Domain.TxInput input ) : bool