lnwallet: create CommitmentBuilder

We define a new struct CommitmentBuilder that will be used to craft the
final commitment transaction based on the current active channel type.
This commit is contained in:
Johan T. Halseth committed 2020-01-06 11:42:03 +01:00
1 parent 13a108e578
commit 613d771daf
4 files changed
+58 -35

No files matched your search

+4 -2
View File
@@ -324,6 +324,8 @@ func CreateTestChannels(tweaklessCommits bool) (
}
alicePool.Start()
obfuscator := createStateHintObfuscator(aliceChannelState)
bobPool := NewSigPool(1, bobSigner)
channelBob, err := NewLightningChannel(
bobSigner, bobChannelState, bobPool,
@@ -334,13 +336,13 @@ func CreateTestChannels(tweaklessCommits bool) (
bobPool.Start()
err = SetStateNumHint(
aliceCommitTx, 0, channelAlice.stateHintObfuscator,
aliceCommitTx, 0, obfuscator,
)
if err != nil {
return nil, nil, nil, err
}
err = SetStateNumHint(
bobCommitTx, 0, channelAlice.stateHintObfuscator,
bobCommitTx, 0, obfuscator,
)
if err != nil {
return nil, nil, nil, err