lib/bitcoin/protocol/tx.rb
# Checks if transaction is final taking into account height and time
# of a block in which it is located (or about to be included if it's unconfirmed tx).
Checks if transaction is final taking into account height and time
of a block in which it is located (or about to be included if it's unconfirmed tx).
Checks if transaction is final taking into account height and time of a block in which it is located ( or about to be included if it ' s unconfirmed tx ) .
def final?(block_height, block_time)
        return true if lock_time.zero?
        lock_threshold = lock_time < Bitcoin::LOCKTIME_THRESHOLD ? block_height : block_time
        return true if lock_time < lock_threshold
        inputs.each { |input| return false unless input.final? }
        true
      end
def final? ( block_height , block_time ) return true if lock_time . zero? lock_threshold = lock_time < Bitcoin :: LOCKTIME_THRESHOLD ? block_height : block_time return true if lock_time < lock_threshold inputs . each { | input | return false unless input . final? } true end
Checks if transaction is final taking into account height and time
of a block in which it is located (or about to be included if it's unconfirmed tx).
Checks if transaction is final taking into account height and time of a block in which it is located ( or about to be included if it ' s unconfirmed tx ) .
# No time lock - tx is final. # Time based nLockTime implemented in 0.1.6 # If lock_time is below the magic threshold treat it as a block height. # If lock_time is above the threshold, it's a unix timestamp.
block_height
<not_specific>
block_time
<not_specific>