mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-06 01:18:17 +02:00
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:
@@ -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