1
0
mirror of https://github.com/lightning/bolts.git synced 2024-11-19 01:50:03 +01:00

Merge pull request #31 from rustyrussell/remove-unneeded-padding

BOLT 2: remove attempts to align signatures.
This commit is contained in:
Christian Decker 2016-12-01 10:53:41 +01:00 committed by GitHub
commit aa1ea27424
2 changed files with 3 additions and 4 deletions

View File

@ -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]

View File

@ -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: