lib/dcha/peer/can_heartbeat.rb in dcha-0.1.1 vs lib/dcha/peer/can_heartbeat.rb in dcha-0.1.2

- old
+ new

@@ -5,12 +5,12 @@ def ping transmit action: :pong, params: [ipaddr.ip_address] end def pong(address) - @peers.push(address).uniq! - transmit action: :mine, params: [chain.blocks] return if @peers.include?(address) + transmit action: :mine, params: [chain.blocks] + @peers.push(address).uniq! transmit_to address, action: :pong, params: [ipaddr.ip_address] end end end end