Module: Bitcoin::Message::CFParser
- Included in:
- GetCFHeaders, GetCFHeaders, GetCFilters, GetCFilters
- Defined in:
- lib/bitcoin/message/cf_parser.rb
Instance Method Summary collapse
Instance Method Details
#parse_from_payload(payload) ⇒ Object
5 6 7 8 |
# File 'lib/bitcoin/message/cf_parser.rb', line 5 def parse_from_payload(payload) type, start, hash = payload.unpack('CLH*') self.new(type, start, hash) end |
#to_payload ⇒ Object
10 11 12 |
# File 'lib/bitcoin/message/cf_parser.rb', line 10 def to_payload [filter_type, start_height, stop_hash].pack('CLH*') end |