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 committed 2019-09-25 18:25:46 -07:00
1 parent b399203e71
commit 0b62126067
9 files changed
+75 -28

No files matched your search

+2 -2
View File
@@ -327,7 +327,7 @@ func createTestChannel(alicePrivKey, bobPrivKey []byte,
RemoteChanCfg: bobCfg,
IdentityPub: aliceKeyPub,
FundingOutpoint: *prevOut,
ChanType: channeldb.SingleFunder,
ChanType: channeldb.SingleFunderTweakless,
IsInitiator: true,
Capacity: channelCapacity,
RemoteCurrentRevocation: bobCommitPoint,
@@ -346,7 +346,7 @@ func createTestChannel(alicePrivKey, bobPrivKey []byte,
RemoteChanCfg: aliceCfg,
IdentityPub: bobKeyPub,
FundingOutpoint: *prevOut,
ChanType: channeldb.SingleFunder,
ChanType: channeldb.SingleFunderTweakless,
IsInitiator: false,
Capacity: channelCapacity,
RemoteCurrentRevocation: aliceCommitPoint,