Support all shutdown scripts defined in BOLT 2
authorJeffrey Czyz <jkczyz@gmail.com>
Mon, 26 Jul 2021 16:31:24 +0000 (12:31 -0400)
committerJeffrey Czyz <jkczyz@gmail.com>
Sat, 31 Jul 2021 05:13:31 +0000 (00:13 -0500)
KeysInterface::get_shutdown_pubkey is used to form P2WPKH shutdown
scripts. However, BOLT 2 allows for a wider variety of scripts. Refactor
KeysInterface to allow any supported script while still maintaining
serialization backwards compatibility with P2WPKH script pubkeys stored
simply as the PublicKey.

Add an optional TLV field to Channel and ChannelMonitor to support the
new format, but continue to serialize the legacy PublicKey format.


No differences found