Commit 95af4c99ef85e7c59817cce1730dc75e9e8079f1

Authored by comboy
Committed by Julian Langschaedel
1 parent 6d329151da

fix some old typo preventing script cache

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

lib/bitcoin/protocol/txout.rb
... ... @@ -44,7 +44,7 @@
44 44 alias :parse_payload :parse_data
45 45  
46 46 def get_script
47   - @script_cache || Bitcoin::Script.new(@pk_script)
  47 + @script_cache ||= Bitcoin::Script.new(@pk_script)
48 48 end
49 49  
50 50 def to_payload
... ... @@ -68,6 +68,7 @@
68 68 script = Script.binary_from_string(output['scriptPubKey'])
69 69 new(amount, script)
70 70 end
  71 +
71 72 # set pk_script and pk_script_length
72 73 def pk_script=(script)
73 74 @pk_script_length, @pk_script = script.bytesize, script