lib/bitcoin/protocol/txin.rb in bitcoin-ruby-0.0.5 vs lib/bitcoin/protocol/txin.rb in bitcoin-ruby-0.0.6
- old
+ new
@@ -40,9 +40,16 @@
def ==(other)
@prev_out == other.prev_out &&
@prev_out_index == other.prev_out_index &&
@script_sig == other.script_sig &&
@sequence == other.sequence
+ rescue
+ false
+ end
+
+ # returns true if the sequence number is final (DEFAULT_SEQUENCE)
+ def is_final?
+ self.sequence == DEFAULT_SEQUENCE
end
# parse raw binary data for transaction input
def parse_data(data)
buf = data.is_a?(String) ? StringIO.new(data) : data