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:
4 files changed
+58
-35
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user