multi: update funding workflow to be aware of new tweakless commits

In this commit, we update the funding workflow to be aware of the new
channel type that doesn't tweak the remote party's output within the
non-delay script on their commitment transaction. To do this, we now
allow the caller of `InnitChannelReservation` to signal if they want the
old or new (tweakless) commitment style.

The funding tests are also updated to test both funding variants, as
we'll still need to understand the legacy format for older nodes.
This commit is contained in:
Olaoluwa Osuntokun
2019-07-31 20:16:52 -07:00
parent b399203e71
commit 0b62126067
9 changed files with 75 additions and 28 deletions

View File

@@ -255,7 +255,7 @@ func createTestPeer(notifier chainntnfs.ChainNotifier,
IdentityPub: aliceKeyPub,
FundingOutpoint: *prevOut,
ShortChannelID: shortChanID,
ChanType: channeldb.SingleFunder,
ChanType: channeldb.SingleFunderTweakless,
IsInitiator: true,
Capacity: channelCapacity,
RemoteCurrentRevocation: bobCommitPoint,
@@ -272,7 +272,7 @@ func createTestPeer(notifier chainntnfs.ChainNotifier,
RemoteChanCfg: aliceCfg,
IdentityPub: bobKeyPub,
FundingOutpoint: *prevOut,
ChanType: channeldb.SingleFunder,
ChanType: channeldb.SingleFunderTweakless,
IsInitiator: false,
Capacity: channelCapacity,
RemoteCurrentRevocation: aliceCommitPoint,