Skip to content

Commit ae36554

Browse files
committed
fixup! fixup! lnwallet+channeldb: add new AuxLeafStore for dynamic aux leaves
1 parent 7fcaa86 commit ae36554

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

contractcourt/breach_arbitrator_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"github.com/go-errors/errors"
2323
"github.com/lightningnetwork/lnd/chainntnfs"
2424
"github.com/lightningnetwork/lnd/channeldb"
25+
"github.com/lightningnetwork/lnd/fn"
2526
"github.com/lightningnetwork/lnd/input"
2627
"github.com/lightningnetwork/lnd/keychain"
2728
"github.com/lightningnetwork/lnd/lntest/channels"
@@ -1590,6 +1591,7 @@ func testBreachSpends(t *testing.T, test breachTest) {
15901591
// Notify the breach arbiter about the breach.
15911592
retribution, err := lnwallet.NewBreachRetribution(
15921593
alice.State(), height, 1, forceCloseTx,
1594+
fn.None[lnwallet.AuxLeafStore](),
15931595
)
15941596
require.NoError(t, err, "unable to create breach retribution")
15951597

@@ -1799,6 +1801,7 @@ func TestBreachDelayedJusticeConfirmation(t *testing.T) {
17991801
// Notify the breach arbiter about the breach.
18001802
retribution, err := lnwallet.NewBreachRetribution(
18011803
alice.State(), height, uint32(blockHeight), forceCloseTx,
1804+
fn.None[lnwallet.AuxLeafStore](),
18021805
)
18031806
require.NoError(t, err, "unable to create breach retribution")
18041807

watchtower/lookout/justice_descriptor_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/btcsuite/btcd/txscript"
1212
"github.com/btcsuite/btcd/wire"
1313
secp "github.com/decred/dcrd/dcrec/secp256k1/v4"
14+
"github.com/lightningnetwork/lnd/fn"
1415
"github.com/lightningnetwork/lnd/input"
1516
"github.com/lightningnetwork/lnd/keychain"
1617
"github.com/lightningnetwork/lnd/lnwallet"
@@ -123,7 +124,7 @@ func testJusticeDescriptor(t *testing.T, blobType blob.Type) {
123124

124125
if isTaprootChannel {
125126
toLocalCommitTree, err = input.NewLocalCommitScriptTree(
126-
csvDelay, toLocalPK, revPK,
127+
csvDelay, toLocalPK, revPK, fn.None[txscript.TapLeaf](),
127128
)
128129
require.NoError(t, err)
129130

@@ -174,7 +175,7 @@ func testJusticeDescriptor(t *testing.T, blobType blob.Type) {
174175
toRemoteSequence = 1
175176

176177
commitScriptTree, err := input.NewRemoteCommitScriptTree(
177-
toRemotePK,
178+
toRemotePK, fn.None[txscript.TapLeaf](),
178179
)
179180
require.NoError(t, err)
180181

watchtower/wtclient/backup_task_internal_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/btcsuite/btcd/txscript"
1111
"github.com/btcsuite/btcd/wire"
1212
"github.com/lightningnetwork/lnd/channeldb"
13+
"github.com/lightningnetwork/lnd/fn"
1314
"github.com/lightningnetwork/lnd/input"
1415
"github.com/lightningnetwork/lnd/keychain"
1516
"github.com/lightningnetwork/lnd/lnwallet"
@@ -136,6 +137,7 @@ func genTaskTest(
136137
if chanType.IsTaproot() {
137138
scriptTree, _ := input.NewLocalCommitScriptTree(
138139
csvDelay, toLocalPK, revPK,
140+
fn.None[txscript.TapLeaf](),
139141
)
140142

141143
pkScript, _ := input.PayToTaprootScript(
@@ -189,7 +191,7 @@ func genTaskTest(
189191

190192
if chanType.IsTaproot() {
191193
scriptTree, _ := input.NewRemoteCommitScriptTree(
192-
toRemotePK,
194+
toRemotePK, fn.None[txscript.TapLeaf](),
193195
)
194196

195197
pkScript, _ := input.PayToTaprootScript(

watchtower/wtclient/client_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"github.com/lightningnetwork/lnd/chainntnfs"
2020
"github.com/lightningnetwork/lnd/channeldb"
2121
"github.com/lightningnetwork/lnd/channelnotifier"
22+
"github.com/lightningnetwork/lnd/fn"
2223
"github.com/lightningnetwork/lnd/input"
2324
"github.com/lightningnetwork/lnd/keychain"
2425
"github.com/lightningnetwork/lnd/kvdb"
@@ -230,12 +231,14 @@ func (c *mockChannel) createRemoteCommitTx(t *testing.T) {
230231

231232
// Construct the to-local witness script.
232233
toLocalScriptTree, err := input.NewLocalCommitScriptTree(
233-
c.csvDelay, c.toLocalPK, c.revPK,
234+
c.csvDelay, c.toLocalPK, c.revPK, fn.None[txscript.TapLeaf](),
234235
)
235236
require.NoError(t, err, "unable to create to-local script")
236237

237238
// Construct the to-remote witness script.
238-
toRemoteScriptTree, err := input.NewRemoteCommitScriptTree(c.toRemotePK)
239+
toRemoteScriptTree, err := input.NewRemoteCommitScriptTree(
240+
c.toRemotePK, fn.None[txscript.TapLeaf](),
241+
)
239242
require.NoError(t, err, "unable to create to-remote script")
240243

241244
// Compute the to-local witness script hash.

0 commit comments

Comments
 (0)