lnwallet+peer: move internalKeyForAddr to lnwallet package

This way we can re-use it. We also make it slightly more generalized.
This commit is contained in:
Olaoluwa Osuntokun committed 2024-10-02 18:09:52 -07:00
1 parent f74d1ce53b
commit e0ced8e629
5 files changed
+160 -79

No files matched your search

+6 -2
View File
@@ -12,6 +12,7 @@ import (
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/fn"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
@@ -667,8 +668,11 @@ func TestSweepPendingInputs(t *testing.T) {
Wallet: wallet,
Aggregator: aggregator,
Publisher: publisher,
GenSweepScript: func() ([]byte, error) {
return testPubKey.SerializeCompressed(), nil
GenSweepScript: func() fn.Result[lnwallet.AddrWithKey] {
//nolint:lll
return fn.Ok(lnwallet.AddrWithKey{
DeliveryAddress: testPubKey.SerializeCompressed(),
})
},
NoDeadlineConfTarget: uint32(DefaultDeadlineDelta),
})