lib/tapyrus/tx_in.rb in tapyrus-0.2.7 vs lib/tapyrus/tx_in.rb in tapyrus-0.2.8

- old
+ new

@@ -1,13 +1,11 @@ # Porting part of the code from bitcoin-ruby. see the license. # https://github.com/lian/bitcoin-ruby/blob/master/COPYING module Tapyrus - # transaction input class TxIn - attr_accessor :out_point attr_accessor :script_sig attr_accessor :sequence # Setting nSequence to this value for every input in a transaction disables nLockTime. @@ -56,15 +54,14 @@ end p << [sequence].pack('V') p end - def to_h sig = script_sig.to_h sig.delete(:type) - h = {txid: out_point.txid, vout: out_point.index, script_sig: sig } + h = { txid: out_point.txid, vout: out_point.index, script_sig: sig } h[:sequence] = sequence h end def ==(other) @@ -74,9 +71,7 @@ # return previous output hash (not txid) def prev_hash return nil unless out_point out_point.tx_hash end - end - end