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 +4 -4
- data/lib/lightning/onion/per_hop.rb +5 -5
- data/lib/lightning/onion/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e96fee0d17c3fa8c0d25227c524d114420a3379
|
4
|
+
data.tar.gz: ace242df5e184ca510f36c08e637cff9cdbaec45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 :
|
7
|
-
def initialize(
|
8
|
-
@
|
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('
|
15
|
+
new(*payload.unpack('Q>2Na16'))
|
16
16
|
end
|
17
17
|
|
18
18
|
def to_payload
|
19
|
-
[
|
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
|