dcha 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b2fe217a2b4d50bbc303d81fe2919321834b1bf
4
- data.tar.gz: bc37476b8daf71cc5ed9a2fe38d4bb81cf879a2e
3
+ metadata.gz: 4460091272e218d638a9a28f1ab38427065a5632
4
+ data.tar.gz: 4a0dc5bf07b7c0ee4fbe169def52ee649506566f
5
5
  SHA512:
6
- metadata.gz: 60bcc5a760110fc41b3b0ee2c08f00c741e11cb9334ae1fb27b169807177574ec579293248bdc8aad4d89aa75e7764f065ab294c3b0d1b9ccdca4380e5714154
7
- data.tar.gz: f2e33ed85d4a28e5845426449b727b9d194b906046f6c24f4ffc914257696399c68722fb33aa50ef4d4859cab6fafa550f3e681350f84af77dd1be1a2c1a9ad7
6
+ metadata.gz: 8bf5698fe91198724f13005988c71cb961eae979f1a68c229de02a25c5cff9008a300a55e268e3229bc66f02fd0847f5a9535541450047c288b37d360a8db27c
7
+ data.tar.gz: 57c584d3e2daf930f8869a302e599790d19071ac9a6bdacd53733723d615327f5bbb9d404315325c0e48c93a5605902d83d281a2533d134af44532ac695cca30
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dcha (0.1.3)
4
+ dcha (0.1.4)
5
5
  curses
6
6
  oj
7
7
  rlp
@@ -7,10 +7,12 @@ module Dcha
7
7
  end
8
8
 
9
9
  def pong(address)
10
- @peers.push(address).uniq!
11
10
  transmit action: :mine, params: [chain.blocks]
12
- return if ipaddr.ip_address == address
13
- transmit_to address, action: :pong, params: [ipaddr.ip_address]
11
+ transmit_to address, action: :add_peer, params: [ipaddr.ip_address]
12
+ end
13
+
14
+ def add_peer(address)
15
+ @peers.push(address).uniq!
14
16
  end
15
17
  end
16
18
  end
@@ -1,3 +1,3 @@
1
1
  module Dcha
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.1.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - 蒼時弦也