Class: Bitcoin::Message::GetBlocks
Overview
block message bitcoin.org/en/developer-reference#getblocks
Constant Summary collapse
- COMMAND =
'getblocks'
Instance Attribute Summary collapse
-
#hashes ⇒ Object
block header hashes.
-
#stop_hash ⇒ Object
Returns the value of attribute stop_hash.
-
#version ⇒ Object
protocol version.
Instance Method Summary collapse
-
#initialize(version, hashes, stop_hash = DEFAULT_STOP_HASH) ⇒ GetBlocks
constructor
A new instance of GetBlocks.
Methods included from HeadersParser
parse_from_payload, to_payload
Methods inherited from Base
from_pkt, #to_payload, #to_pkt
Methods included from Util
#byte_to_bit, #calc_checksum, #decode_base58_address, #double_sha256, #encode_base58_address, #hash160, #hkdf_sha256, #hmac_sha256, #pack_boolean, #pack_var_int, #pack_var_string, #padding_zero, #sha256, #tagged_hash, #unpack_boolean, #unpack_var_int, #unpack_var_int_from_io, #unpack_var_string, #valid_address?
Methods included from HexConverter
Constructor Details
#initialize(version, hashes, stop_hash = DEFAULT_STOP_HASH) ⇒ GetBlocks
Returns a new instance of GetBlocks.
20 21 22 23 24 |
# File 'lib/bitcoin/message/get_blocks.rb', line 20 def initialize(version, hashes, stop_hash = DEFAULT_STOP_HASH) @version = version @hashes = hashes @stop_hash = stop_hash end |
Instance Attribute Details
#hashes ⇒ Object
block header hashes
16 17 18 |
# File 'lib/bitcoin/message/get_blocks.rb', line 16 def hashes @hashes end |
#stop_hash ⇒ Object
Returns the value of attribute stop_hash.
18 19 20 |
# File 'lib/bitcoin/message/get_blocks.rb', line 18 def stop_hash @stop_hash end |
#version ⇒ Object
protocol version
13 14 15 |
# File 'lib/bitcoin/message/get_blocks.rb', line 13 def version @version end |