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 is_final?(block_height, block_time)
        return true if lock_time == 0
        return true if lock_time < (lock_time < Bitcoin::LOCKTIME_THRESHOLD ? block_height : block_time)
        inputs.each{|input| return false if !input.is_final? }
        return true
      end
def is_final? ( block_height , block_time ) return true if lock_time == 0 return true if lock_time < ( lock_time < Bitcoin :: LOCKTIME_THRESHOLD ? block_height : block_time ) inputs . each { | input | return false if ! input . is_final? } return 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
block_time