lightning-onion 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '094a2b5177496efebc0d202f013203b6b086df5e'
4
- data.tar.gz: 40bcab230c92616e78f3ad1cfee4c6ff9b810855
3
+ metadata.gz: 8e96fee0d17c3fa8c0d25227c524d114420a3379
4
+ data.tar.gz: ace242df5e184ca510f36c08e637cff9cdbaec45
5
5
  SHA512:
6
- metadata.gz: f073224a13e1211644f32daaf77dea9ed7f65bfc0baf0876140ba6cb84e7134394128713a727a612267452dc062087c5b939943c67eb25891c832fa82282784c
7
- data.tar.gz: 81bb5e492714d93acbcf22476cd1c6f68b7d2095d3fd9f951b28df13fd9b19df57dc2aa69c8e536001a13ce4df244b810947c2d3d46aa7c1133e85e6b57b6884
6
+ metadata.gz: 23f082d3364b7f6055196c53eebf9f4b2c27c1f745bc212013d264905709683b4780f6e8c4ba12fcf610729ced94ffd753fad525723db4a9568d44666772121c
7
+ data.tar.gz: f261e6f469659ee727ece29a27df3fedfab34c93eccfc053c605f3181a87f2f719a6efee6a6eec3e879da7cd87e104ad72d68c8c4bb0bb9bd26e1c223d014f71
@@ -3,20 +3,20 @@
3
3
  module Lightning
4
4
  module Onion
5
5
  class PerHop
6
- attr_accessor :channel_id, :amt_to_forward, :outgoing_cltv_value, :padding
7
- def initialize(channel_id, amt_to_forward, outgoing_cltv_value, padding)
8
- @channel_id = channel_id
6
+ attr_accessor :short_channel_id, :amt_to_forward, :outgoing_cltv_value, :padding
7
+ def initialize(short_channel_id, amt_to_forward, outgoing_cltv_value, padding)
8
+ @short_channel_id = short_channel_id
9
9
  @amt_to_forward = amt_to_forward
10
10
  @outgoing_cltv_value = outgoing_cltv_value
11
11
  @padding = padding
12
12
  end
13
13
 
14
14
  def self.parse(payload)
15
- new(*payload.unpack('a8N2a16'))
15
+ new(*payload.unpack('Q>2Na16'))
16
16
  end
17
17
 
18
18
  def to_payload
19
- [channel_id, amt_to_forward, outgoing_cltv_value, padding].pack('a8N2a16')
19
+ [short_channel_id, amt_to_forward, outgoing_cltv_value, padding].pack('Q>2Na12')
20
20
  end
21
21
  LAST_NODE = PerHop.parse("\x00" * 32)
22
22
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lightning
4
4
  module Onion
5
- VERSION = '0.2.1'
5
+ VERSION = '0.2.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lightning-onion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hajime Yamaguchi