lib/btcruby/transaction_outpoint.rb in btcruby-1.0.5 vs lib/btcruby/transaction_outpoint.rb in btcruby-1.0.6

- old
+ new

@@ -20,10 +20,20 @@ end def outpoint_id %{#{transaction_id}:#{index}} end - + + def ==(other) + index == other.index && + transaction_hash == other.transaction_hash + end + alias_method :eql?, :== + + def hash + transaction_hash.hash ^ index + end + def to_s outpoint_id end end end