Method: Bitcoin::Script#subscript_codeseparator
- Defined in:
- lib/bitcoin/script.rb
#subscript_codeseparator(separator_index) ⇒ Object
Returns a script that deleted the script before the index specified by separator_index.
307 308 309 310 311 312 313 314 315 |
# File 'lib/bitcoin/script.rb', line 307 def subscript_codeseparator(separator_index) buf = [] process_separator_index = 0 (chunks || @chunks).each{|chunk| buf << chunk if process_separator_index == separator_index process_separator_index += 1 if chunk == OP_CODESEPARATOR and process_separator_index < separator_index } to_binary(buf) end |