Skip to content

Commit f7f875b

Browse files
committed
fixup! fixup! lnwallet+channeldb: add new AuxLeafStore for dynamic aux leaves
1 parent 48a1317 commit f7f875b

File tree

6 files changed

+17
-6
lines changed

6 files changed

+17
-6
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"
@@ -1585,6 +1586,7 @@ func testBreachSpends(t *testing.T, test breachTest) {
15851586
// Notify the breach arbiter about the breach.
15861587
retribution, err := lnwallet.NewBreachRetribution(
15871588
alice.State(), height, 1, forceCloseTx,
1589+
fn.None[lnwallet.AuxLeafStore](),
15881590
)
15891591
require.NoError(t, err, "unable to create breach retribution")
15901592

@@ -1794,6 +1796,7 @@ func TestBreachDelayedJusticeConfirmation(t *testing.T) {
17941796
// Notify the breach arbiter about the breach.
17951797
retribution, err := lnwallet.NewBreachRetribution(
17961798
alice.State(), height, uint32(blockHeight), forceCloseTx,
1799+
fn.None[lnwallet.AuxLeafStore](),
17971800
)
17981801
require.NoError(t, err, "unable to create breach retribution")
17991802

input/size_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,7 @@ func genTimeoutTx(t *testing.T,
13881388
timeoutTx, err := lnwallet.CreateHtlcTimeoutTx(
13891389
chanType, false, testOutPoint, testAmt, testCLTVExpiry,
13901390
testCSVDelay, 0, testPubkey, testPubkey,
1391+
fn.None[txscript.TapLeaf](),
13911392
)
13921393
require.NoError(t, err)
13931394

@@ -1456,7 +1457,7 @@ func genSuccessTx(t *testing.T, chanType channeldb.ChannelType) *wire.MsgTx {
14561457
// Create the unsigned success tx.
14571458
successTx, err := lnwallet.CreateHtlcSuccessTx(
14581459
chanType, false, testOutPoint, testAmt, testCSVDelay, 0,
1459-
testPubkey, testPubkey,
1460+
testPubkey, testPubkey, fn.None[txscript.TapLeaf](),
14601461
)
14611462
require.NoError(t, err)
14621463

lnwallet/channel_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"github.com/lightningnetwork/lnd/lntypes"
2727
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
2828
"github.com/lightningnetwork/lnd/lnwire"
29+
"github.com/lightningnetwork/lnd/tlv"
2930
"github.com/stretchr/testify/require"
3031
)
3132

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)