lib/bitcoin/protocol/version.rb in bitcoin-ruby-0.0.10 vs lib/bitcoin/protocol/version.rb in bitcoin-ruby-0.0.11

- old
+ new

@@ -4,10 +4,11 @@ module Protocol # https://en.bitcoin.it/wiki/Protocol_specification#version class Version # services bit constants + NODE_NONE = 0 NODE_NETWORK = (1 << 0) attr_reader :fields def initialize(opts={}) @@ -23,10 +24,10 @@ :relay => true # BIP0037 }.merge( opts.reject{|k,v| v == nil } ) end def to_payload - payload = [ + [ @fields.values_at(:version, :services, :time).pack("VQQ"), pack_address_field(@fields[:from]), pack_address_field(@fields[:to]), @fields.values_at(:nonce).pack("Q"), Protocol.pack_var_string(@fields[:user_agent]),