mirror of
https://github.com/lightning/bolts.git
synced 2024-11-19 10:00:04 +01:00
BOLT 2: remove attempts to align signatures.
They're really a blob of bytes, and we weren't aligning them correctly in two cases anyway. This gets rid of gratuitous padding, too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
351e0deda2
commit
b228a2e77d
@ -198,7 +198,6 @@ signature, it will broadcast the funding transaction.
|
||||
* [8:temporary-channel-id]
|
||||
* [32:txid]
|
||||
* [1:output-index]
|
||||
* [1:pad]
|
||||
* [64:signature]
|
||||
|
||||
#### Requirements
|
||||
@ -735,7 +734,7 @@ The description of key derivation is in [BOLT #3](03-transactions.md#key-derivat
|
||||
* [8:channel-id]
|
||||
* [32:per-commitment-secret]
|
||||
* [33:next-per-commitment-point]
|
||||
* [3:padding]
|
||||
* [1:padding]
|
||||
* [2:num-htlc-timeouts]
|
||||
* [num-htlc-timeouts*64:htlc-timeout-signature]
|
||||
|
||||
|
@ -15,7 +15,7 @@ def guess_alignment(message,name,sizestr):
|
||||
# - channel-id is size 8, but has alignment 4.
|
||||
# - node_announcement.ipv6 has size 16, but alignment 4 (to align IPv4 addr).
|
||||
# - node_announcement.alias is a string, so alignment 1
|
||||
# - signatures have alignment 4, because why not.
|
||||
# - signatures have no alignment requirement.
|
||||
if match.group('name').startswith('pad'):
|
||||
return 1
|
||||
|
||||
@ -29,7 +29,7 @@ def guess_alignment(message,name,sizestr):
|
||||
return 1
|
||||
|
||||
if 'signature' in match.group('name'):
|
||||
return 4
|
||||
return 1
|
||||
|
||||
# Size can be variable.
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user